Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
First time posting and hoping the community would be able to help me out or point me in the right direction with this. I'm converting a few Measures from a Multidimensional to a Tabular model. I'm getting a bit lost in this converison process of this particular measure.
Theres a custom table 'Seasons' with 2 values from the Multidimensonal model that has no joins to the 'Measures' Fact table but it is binding the measures of the fact table using MDX via Calculations in the Multidimensonal. The expression is:
Case
When
[Seasons Dimension].[Seasonality].CurrentMember IS [Seasons Dimension].[Seasonality].&[2.]
Then ROUND([Measures].[Seasons_Count_1]) Else [Measures].[Seasons_Count_2]
End
I was wondering if this type of MDX query can be converted to DAX?
Cheers
Solved! Go to Solution.
Hi, @GillyGils ;
Try it.
measure =
IF (
'Seasons'[Seasonality] = 2,
ROUND ( [Seasons_Count_1], 0 ),
[Seasons_Count_2]
)
If it is not correct, can you screenshot the simple data in your powerbi and the result you want to output?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your input guys. Got myself confused at looking at SelectedMeasures & Haseonvalues 😑 This is the final formula I used to get my desired results:
Measure_Test = IF(SELECTEDVALUE('Seasons'[Seasonaility]) = 2, ROUND(SUM([Season_Count_1),0),
[Seasons_Count_2]))
I will need to use the SWITCH function in over statements but this was a good base for me. Only really starting to getting the hang of DAX. Thanks for the help!
Hi, @GillyGils ;
Try it.
measure =
IF (
'Seasons'[Seasonality] = 2,
ROUND ( [Seasons_Count_1], 0 ),
[Seasons_Count_2]
)
If it is not correct, can you screenshot the simple data in your powerbi and the result you want to output?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
the measures of the fact table
That's not really a thing in Power BI (Host table notwithstanding). You can use a similar SWITCH statement to change the measure logic based on an input value.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |