The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I'm sure this one is simple but I still can't figure it out. I have a situation where I want to show totals in a column of a table visual ONLY if the values in another column are unique. In this case, we have a local currency column, and a US currency column. If we have more than one type of local currency in our table, then it makes no sense to show a total, since the numbers aren't on the same scale. The USD column would always have a total, since that is always on the same scale. So in example 1, there's no total for Local Amt, but there is in Example 2, because all local currencies are Brazil. This would obviously need to be responsive to any filters applied to the visual.
In essence I need to say "if sum of count of distinct values in currency column = 1 then sum(local amt), else blank" but I can't figure out the DAX to do this.
Solved! Go to Solution.
@Anonymous
You may use the measure below.
Measure = IF ( HASONEVALUE ( 'Table'[Currency] ), CALCULATE ( SUM ( 'Table'[Local Amt] ) ) )
@Anonymous
You may use the measure below.
Measure = IF ( HASONEVALUE ( 'Table'[Currency] ), CALCULATE ( SUM ( 'Table'[Local Amt] ) ) )
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
45 |