Hello! I have a table of prescriptions, with the columns laboratory, idvmp and idprescription. I need to count the distinct quantity of idprescriptions when i filter the column laboratory. But I dont want to count just the idprescriptions of the filtered lab… I filter the laboratory just to get the idvpms associated with it. But other laboratories can have medicines with the same idvmps from that lab, so it needs to count all
Hi @MichaelFer and welcome to the QuickSight community!
Apologies from the community on your topic not being answered yet. One quick note when posting, when you add a comment on one of your posts, it removes the post from the ‘new’ section which could lead to an instance like this. So I would suggest editing your original post as opposed to adding another comment for future reference!
In regards to your question, I would suggest trying out a distinctCount calculation, adding ‘PRE_FILTER’ should assist in getting your count prior to the filtering of laboratories. I’ve attached an article that explores this a bit further in depth for reference.
Let me know if you have any additional questions!
Hi @MichaelFer,
Following up here to see if you have any additional questions?
If we do not hear back within the next 3 business days, I’ll go ahead and close out this topic.
Thank you!
Hi @MichaelFer,
Since we haven’t heard back, I’ll close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.
Thank you!