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.
Greetings.
I have a table in the following format:
I am attempting to create a table that looks like the one shown below but instead of the row subtotal it would show the % difference of the values in the rows above.
I made a workaround for the individual metershed report by having the model and observed values in a table visual and the corresponding % difference values in separate card visuals.
However, this workaround solution doesn't work well when trying to show a summary of the % difference for all the meters. Any suggestions on how to create a table with these know values and the calculated % difference values would be appreciated. Then from there, I would like to have a measure that returns the lowest % difference for a given metershed over the 3 calibration events.
Thanks,
Steven
Steven
Solved! Go to Solution.
Hi,
Please try this measure:
Measure =
var a = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Data Type]="Event AverageModel Flow"&&'Table'[Calibration Event] in FILTERS('Table'[Calibration Event])&&'Table'[Metershed] in FILTERS('Table'[Metershed])))
var b = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Data Type]="Event AverageObserved Flow"&&'Table'[Calibration Event] in FILTERS('Table'[Calibration Event])&&'Table'[Metershed] in FILTERS('Table'[Metershed])))
return
IF(ISINSCOPE('Table'[Data Type]),FORMAT(SUM('Table'[Value]),"Fixed"),FORMAT((b-a)/a,"Percent"))
The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Hi,
Please try this measure:
Measure =
var a = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Data Type]="Event AverageModel Flow"&&'Table'[Calibration Event] in FILTERS('Table'[Calibration Event])&&'Table'[Metershed] in FILTERS('Table'[Metershed])))
var b = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Data Type]="Event AverageObserved Flow"&&'Table'[Calibration Event] in FILTERS('Table'[Calibration Event])&&'Table'[Metershed] in FILTERS('Table'[Metershed])))
return
IF(ISINSCOPE('Table'[Data Type]),FORMAT(SUM('Table'[Value]),"Fixed"),FORMAT((b-a)/a,"Percent"))
The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Thanks that worked!
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
112 | |
81 | |
65 | |
48 | |
38 |