Forum Discussion
A slicer for a pivot table
- 8 years ago
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" ) - 8 years ago
Hi Ynew
The results are shown in the image above.
Did you try it as a calculated column with your full data?
The Formula just counts the distinct number of products for each customer and if it it is more than 1, it is marked as "Multiple Type"
Hi Muhammad,
Yes I tried, but the tool does not understand the first and last part of your formulation. The highlited parts I mean.
I checked your image, I assume you have formulated in Excel. Even in Excel I could not get the same formulation. Could you please send me the exact formulation you have in power BI?
- Zubair_Muhammad8 years ago
Community Champion
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" )- Zubair_Muhammad8 years ago
Community Champion
- Ynew8 years ago
Helper I
Thank you very much. I will surely check them since I need to be expert in power BI. I will use it alot for analyzing my data.
- Ynew8 years ago
Helper I
Thank you very very much for your help. It is working now. And sorry, I did not know that there is a link between Excel and Power BI. Good to know that too, I will dig into that to learn how I can use.
Many thanks again.