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 All,
I need help with coming up with a solution for my problem as below.
To make my question easy to understand I define a simple version of my real data. I have three columns as below:
Customer name Products Order Volume
A DDD 3
B EEE 5
A FFF 12
B EEE 10
B HHH 8
C HHH 6
C HHH 4
A HHH 1
In fact, I have multiple customers and multiple products with their order volumes. I need to create a slicer. The slicer with have two options to show if a customer is only one type of product or multiple products. So the slicer needs to have options like "Single type" and "Multiple type".
As you see in the above example only customer "C" has "Single type". So I want to have a slicer so that when I have a column visual which shows the total order volume for customers, I can filter the customer to only see the customers with "Single Order" or "Multiple types".
I appreciate your kind suggestions and thank you very much in advance.
Solved! Go to Solution.
Hi @Ynew
It seems your version of Excel does not support DAX variables
Please try this instead
= IF ( CALCULATE ( DISTINCTCOUNT ( TableName[Products] ), ALLEXCEPT ( TableName, TableName[Customer name] ) ) > 1, "Multiple Type", "Single Type" )
HI @Ynew
Some good articles on DAX variables
https://www.sqlbi.com/articles/variables-in-dax/
https://msdn.microsoft.com/en-us/library/mt243785.aspx
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |