Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
We calculate and report OSHA TRIR monthly in a Matrix that has the "goal", "results" and "delta".
The challange is to have the last or latest value as the "Total"
I use the current formula which is part of a Switch with about 60 metrics:
| Results = (if(HASONEVALUE(T_Metric_Input_History[Metric]) |
| ,switch(values('T_Metric_Input_History'[Metric]) |
| ,"OSHA TRIR",format(average(T_Metric_Input_History[Results]),"0.00") |
Any help would be greatly appreciated!
Solved! Go to Solution.
@PaulBethancourt , use a measure like on top of you measure
if(not isinscope(Date[year Month]),calculate(lastnonblankvalue(Date[year Month], [Measure]),allselected(Date[year Month])),[Measure])
I have the following table with a DAX that calculates the variation versus the previous month and I want the total to be equal to the last month with data (marked in yellow) could you help me how to modify the DAX please
@PaulBethancourt , use a measure like on top of you measure
if(not isinscope(Date[year Month]),calculate(lastnonblankvalue(Date[year Month], [Measure]),allselected(Date[year Month])),[Measure])
amitchandak, you are a rock star!
Thank you very much!
I made a minor change in order to use the Result column since it wasn't a measure.
I used an average of it.
| ,"OSHA TRIR",format(if(not isinscope('Date table'[YRMO]),calculate(lastnonblankvalue('Date table'[YRMO],average(T_Metric_Input_History[Results])),allselected('Date table'[YRMO])),average('T_Metric_Input_History'[Results])),"0.00") |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 67 | |
| 34 | |
| 32 | |
| 29 |