Forum Discussion
Power BI distinct values for column for table creation
- Anonymous6 years ago
Hi -Ozym4nd1az- ,
I see. So you should use DISTINCT() function to create a distinct table and use this table to create a visual.
Then create a measure as below and add it to visual level filter.
Measure = IF(CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[number]))=1,1,IF(SELECTEDVALUE('Table'[SLA not met])=1,0,1))Or if you want a table, you can create a calculated column on the raw table as below.
Column = IF(CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[number]))=1,1,IF('Table'[SLA not met]=1,0,1))Then do the distinct work.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
If I use your first solution with visual filter can I still perform calculations which it is going to consider the filter level for that?
I need to performed some calculations with that column 'SLA not MET'.
Hi -Ozym4nd1az- ,
It's a visual level filter and only calculation on the visual will be affected.
Or you can use ALL() function to remove the filter in your formula if you need.
Generally, it depends on your need and your dax formula.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.