Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have two CM
| DateShiftKey | SortingNum |
| 20240101DS | 1 |
| 20240101NS | 2 |
| 20240102DS | 3 |
| 20240102NS | 4 |
| 20240103DS | 5 |
| 20240103NS | 6 |
| 20240104DS | 7 |
| 20240104NS | 8 |
| 20240105DS | 9 |
| 20240105NS | 10 |
Solved! Go to Solution.
Hi, @Anonymous
Thank you very much for your reply. You should put this metric and DateShiftKey column in table visual. See if you get the expected results. The metric needs to rely on an external context such as the DateShiftKey column to work.
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Perhaps you could try the following dax expression:
SortingNum1 =
VAR DSKValue = [DSKfromlastcyle]
RETURN
CALCULATE(
MAX(DimCrewSchedule[SortingNum]),
FILTER(ALLSELECTED(DimCrewSchedule),
DimCrewSchedule[DateShiftKey] = DSKValue
)
)The results are as follows:
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Thank you very much for your reply. You should put this metric and DateShiftKey column in table visual. See if you get the expected results. The metric needs to rely on an external context such as the DateShiftKey column to work.
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Make some changes in second CM
SortingNum =
VAR SelectedDateShiftKey = [DSKfromlastcyle]
RETURN
CALCULATE(
MAX(DimCrewSchedule[SortingNum]),
DimCrewSchedule[DateShiftKey] = SelectedDateShiftKey
)
Proud to be a Super User! |
|
@bhanu_gautam
Thanks for helping, I tried the DAX you provided, but it still gives me blank
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |