This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I have a table where I have my dimension which is dependent from a field parameter and my sales. The user can select one or various dimension in the field parameter;
As a second mesure in the table I want to calculated the Max of my Sales. If nothing is selected like in my example below I should have "1746" as a Maximum Sales :
But If I select as a dynamic dimension "Country" then the Max sales should be "3214"
I precise that I want this mesure "MAX SALES" to be in my table. So In the example above I Should have for the 3 lines the repetition of 3214.
I've tried this DAX Formula :
Hi @claxxx ,
Please try to change your measure with below dax formula:
Max Sales_dynamic =
VAR SelectedDimension =
SELECTEDVALUE ( 'Dynamic Dimension'[Dynamic Dimension], "All" )
VAR MaxSales =
CALCULATE ( MAX ( 'Sales'[SalesAmount] ), ALLSELECTED ( 'Sales' ) )
RETURN
IF (
SelectedDimension = "All",
MaxSales,
MAXX (
FILTER (
ALLSELECTED ( 'Sales' ),
'Sales'[Dynamic Dimension] = SelectedDimension
),
[SalesAmount]
)
)
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello , Thank you for your answer.
In my case the measure Sales is in a table named "MESURES" where I stock all my measures. Should I refer to this table?
In your formula I don't understand what
'Sales'[Dynamic Dimension]
refers to ? Because my Dynamic Dimension is just in my table
'Dynamic Dimension'
created by the field parameters .
Other point, If the user select 2 fields how can I manage it in the dax formula
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 22 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 26 | |
| 22 | |
| 21 |