Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Team,
Please help with below request.
I have 3 measures and 3 dimensions as shown below.
Dims Measure
Branch Budget Budget
InsideSalesName InsideSalesBudget
->Inside SalesNumber
OusideSalesName OutsideSalesBudget
->OutsideSalesNumber
So i need to create single calculated measure 'Budget' that displays respective measure value depending on dimension picked by user in visual.
We we having this in multi-dimensional like below but i need in DAX
SCOPE([MEASURES].[Budget]);
SCOPE([Outside Sales].[Outside Sales].[Outside Sales Name].MEMBERS);
IF NOT ISEMPTY([MEASURES].[Ship Resale - SALE]) OR NOT ISEMPTY([MEASURES].[Book Resale - SALE]) THEN THIS = [MEASURES].[Outside Sales Budget]
END IF;
IF ISEMPTY([MEASURES].[Ship Resale - SALE]) AND ISEMPTY([MEASURES].[Book Resale - SALE]) THEN THIS = NULL
END IF;
END SCOPE;
SCOPE([Outside Sales].[Outside Sales].[Outside Sales Number].MEMBERS);
IF NOT ISEMPTY([MEASURES].[Ship Resale - SALE]) OR NOT ISEMPTY([MEASURES].[Book Resale - SALE]) THEN THIS = [MEASURES].[Outside Sales Budget]
END IF;
IF ISEMPTY([MEASURES].[Ship Resale - SALE]) AND ISEMPTY([MEASURES].[Book Resale - SALE]) THEN THIS = NULL
END IF;
END SCOPE;
END SCOPE;
@pmadam ,
Now if you want change both dimension(Axis/Row/Group by) and measure, You need bookamarks and button
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
But if only want change the axis then you need to have independent table with these three values and use a measure slicer
Measure =
var _change =selectedvalues(Table[Dimension])
return
SWITCH (
TRUE(),
_change = "Branch Budget " , [Budget ],
_change = "Inside Sales Name" , [InsideSalesBudget],
_change = "Outside Sales Budget " , [OutsideSalesBudget],
)
measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
User | Count |
---|---|
57 | |
22 | |
18 | |
16 | |
11 |
User | Count |
---|---|
85 | |
54 | |
39 | |
21 | |
18 |