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.
Hi there,
I am very stuck at the moment.
I want to calculate a value from known value and a known total aka a ratio, and then apply this to all other rows in a table.
Ratio = known count of items from an area / known total from a specific location
_ratiocalc = (CALCULATE([Calc1],Table1[Column1]="String1")/ CALCULATE(sum(Table2[Column2]),Table2[Column3]="String2"))
It would be :
TotalCount = [_ratiocalc] * Table2[Column2]
eg: where ratio = 0.9
|Column3|Column2|TotalCount|
|a| 1000| ? |
|b| 2000 | ? |
|string2| 3500 | 3150 |
However, when I apply this calculation, ONLY the row where hospital = x shows an accurate value. the others are infinity symbol.
I did try to use the below to make a temp variable _RatioStatic and "all" & "filter" to show all, but that didn't work.
_RatioStatic = CALCULATE([_ratiocalc],filter(all(Table2[Column3]),Table2[Column3]),filter(all(Table1[Column1]),Table1[Column1]))
Any help would be really great!!
Solved! Go to Solution.
Thank you !
Actually, using this formula as a column worked and calculated as required! - where _ratioStatic is a measure.
TotalCount = calculate([_RatioStatic],all()) * Table2[Column2]
Thank you !
Actually, using this formula as a column worked and calculated as required! - where _ratioStatic is a measure.
TotalCount = calculate([_RatioStatic],all()) * Table2[Column2]
@Anonymous , You can not use a measure in a column. Think in term of new measure
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 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |