Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello PB Community and super guru's i,e @Ahmedx , @lbendlin
I need 1 DAX / Measure to achieve the following
1. find the Min value from an existing measure (Actual Avg TMAX RZ)
2. find the Max value from an existing measure (Actual Avg TMAX RZ)
3. Difference between Max and Min from point 1 & 2
4. Multiply the Difference (from point 3) by the measure (Total Run time) filtering by values from 1.
Excel File
https://1drv.ms/x/s!AjIGh95acxebg6MRIvZG56trS7ljtQ?e=DVd8tT
Attached Pbix.
https://1drv.ms/u/s!AjIGh95acxebg6MQyLee1C3MHik0MA?e=3WgSIw
Solved! Go to Solution.
HI @wasirafi,
I do't understand why max = 480 and not 481 but if that is a mistake you might try with the following measure:
_result =
VAR _min =
CALCULATE(
MIN(v_run[Actual Avg TMAX RZ]),
ALL(v_run[Actual Avg TMAX RZ])
)
VAR _max =
CALCULATE(
MAX(v_run[Actual Avg TMAX RZ]),
ALL(v_run[Actual Avg TMAX RZ])
)
VAR _runTime =
CALCULATE(
[_Total Run Time],
v_run[Actual Avg TMAX RZ] = _min
)
RETURN _runTime * (_max - _min)
HI @wasirafi,
I do't understand why max = 480 and not 481 but if that is a mistake you might try with the following measure:
_result =
VAR _min =
CALCULATE(
MIN(v_run[Actual Avg TMAX RZ]),
ALL(v_run[Actual Avg TMAX RZ])
)
VAR _max =
CALCULATE(
MAX(v_run[Actual Avg TMAX RZ]),
ALL(v_run[Actual Avg TMAX RZ])
)
VAR _runTime =
CALCULATE(
[_Total Run Time],
v_run[Actual Avg TMAX RZ] = _min
)
RETURN _runTime * (_max - _min)
Hey Wini_R.
Yes that was a typo. the DAX worked exactly as i wanted. Thank you
You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.
Ibendlin,
Yes you are right. i am requesting only 1 measure that applies this entire logic. I called them out as measures just for the sake to notify the basic level of efforts i have done so far.
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 |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |