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
Hello Community,
I want to show Scores from different location and then pick the one with the lowest score.
Actually I need to show this via Bar Chart hence needed a temp table to show the overall minimum bar (I know with tables we can directly get the min values)
1st way (working)
Why it is not working for the second way ?
Regards,
Ritesh
Solved! Go to Solution.
Hi,
Please try something like below.
test_minx_fixed =
IF(
CONTAINSSTRING(SELECTEDVALUE(Location_Temp[Location]), "Over"),
MINX(
FILTER(ALL(Location_Temp[Location]), Location_Temp[Location] <> "Overall Minimum"),
CALCULATE(SUM(Fact_Employee_Training[Score]))
),
CALCULATE(
SUM(Fact_Employee_Training[Score]),
Dim_Employee[Location] = SELECTEDVALUE(Location_Temp[Location])
)
)
Your second formula returns blank because MINX lacks row context—CALCULATE(SUM(...)) isn’t filtered per location. Also, CALCULATE(..., Dim_Employee[Location] = ...) is invalid syntax unless wrapped in a FILTER().
Fix: Use FILTER() inside MINX to apply location context:
MINX(
VALUES(Dim_Employee[Location]),
CALCULATE(
SUM(Fact_Employee_Training[Score]),
FILTER(
ALL(Dim_Employee),
Dim_Employee[Location] = EARLIER(Dim_Employee[Location])
)
)
)
Thanks Shahid,
Unfortunately your solution is not working
(update)
However, the same DAX works here
Regards,
Ritesh
Hi,
Please try something like below.
test_minx_fixed =
IF(
CONTAINSSTRING(SELECTEDVALUE(Location_Temp[Location]), "Over"),
MINX(
FILTER(ALL(Location_Temp[Location]), Location_Temp[Location] <> "Overall Minimum"),
CALCULATE(SUM(Fact_Employee_Training[Score]))
),
CALCULATE(
SUM(Fact_Employee_Training[Score]),
Dim_Employee[Location] = SELECTEDVALUE(Location_Temp[Location])
)
)
Hi @Jihwan_Kim
Great this is working,accepting this as Solution , but I am still not sure why the below is not working ?
MINX(
Same DAX is working in the below scenario
Regards,
Ritesh
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 |