Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello folks,
I've been using the DAX Measure below, which works fine on a table and where it helps me identify customers who have bought a specific product. However, I now need to have its total shown on a card visual and I can't find a way to do so.
Customers who didn't buy2 = IF( HASONEVALUE(Products[Products]); CALCULATE( DISTINCTCOUNT(BI_Sales[ClientId]); FILTER(BI_Sales;NOT(CONTAINs(BI_Sales;BI_Sales[Produtos];VALUES(Products[Products])))) ); DISTINCTCOUNT(BI_Sales[ClienteId]) )
Thank you!
Solved! Go to Solution.
Hi @Asantos2020 ,
We can try to use the following measure, change the customer and id in formula to the column you used in table visual.
TotalCount = SUMX ( VALUES ( 'Customer'[CustomerID] ), IF ( CALCULATE ( [Customers who didn't buy2] ) = 1, 1, BLANK () ) )
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Asantos2020 ,
We can try to use the following measure, change the customer and id in formula to the column you used in table visual.
TotalCount = SUMX ( VALUES ( 'Customer'[CustomerID] ), IF ( CALCULATE ( [Customers who didn't buy2] ) = 1, 1, BLANK () ) )
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Asantos2020
When you say it "works fine in a table" you mean a table visual? or a real data table? Can you provide details on how exactly you are using the measure now (what fields go on the visual and what your data model looks like).
Hi @AlB !
Details are below. I've greyed out ClienteFantasia and Últ. Vendedor for confidentiality purposes, but I guess the rest clarifies:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |