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.
I have a MDX query that needs to be converted in DAX in Power BI. MDX:
CASE WHEN ISEMPTY( [Measures].[Total] ) THEN NULL ELSE IIF(ISEMPTY( Axis(1).Item(0).Item(0).Dimension.Levels(0).item(0)),1,[Measures].[Total] / (Axis(1).Item(0).Item (0).Dimension.Levels(0).item(0), [Measures].[Total] )) ENDTotal / (The Total of the entire columnar data)
I assume that the above query is: Total is Aggregated sum of the data as per month or any dimension and % Total is:
Total / (The Total of the entire columnar data)
Please see the below screenshot (Sample data) :
Please help me achieve the above functionality in Power BI. Thanks in advanced.
Solved! Go to Solution.
@harrypotter,
Please create a new column using the DAX below and check if you get expected result.
Total % = if(ISBLANK(SampleData[Total]),BLANK(),SampleData[Total]/sum(SampleData[Total]))
Regards,
Lydia
@harrypotter,
Please create a new column using the DAX below and check if you get expected result.
Total % = if(ISBLANK(SampleData[Total]),BLANK(),SampleData[Total]/sum(SampleData[Total]))
Regards,
Lydia
Thanks Lydia for the solution! 🙂
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |