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.
Hello All,
This time I have following issue...
For the following funcions and following model funcion SWITCH works well
BUT for the following model and following funcions SWITCH doesn't work.
I would like to understand what is the logic behind in one case (model without ralationship) I can assign sum of two values to Gross margin label but in other case (model with relationship) I can't?
How to upragre my DAX to resolve this issue?
Thank you in advance fo your reply.
Thank
Solved! Go to Solution.
@Anonymous
It's easy to explain the behaviour if you know how filters interplay with CALCULATE, especially nested CALCULATE's.
In the first example, the table 'Admin Categories' does not filter anything, even if you put its columns in a visual; hence you can see values. In the second example, 'Admin List' filters 'Admin Account'. Now, if you put a column from 'Admin List' in a visual, 'Admin Account' gets cross-filtered and the filter is "Gross Margin Level..." Hence, only rows which join to this value are visible in the current context. Since your measures [1] and [2] filter (in their definition) on the field 'Admin Account'[Level 1] and the values you want to filter by have been eliminated by the filter coming from 'Admin List'... well, therefore blank is returned.
@Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Also
In the second case in Switch replace selectedvalue with Max and text once.
Hi,
there is pbx file
https://drive.google.com/drive/folders/1foPUnS13r7KeZsLDHOiU6JsOk5npvWci?usp=sharing
i have changed the scenario like following
but issue is the same,
I can't make mathematical calculation and switch to France + Germany,
Switch funcion works only for txt message.
Thank you in advance for your reply how to solve this issue.
@Anonymous
It's easy to explain the behaviour if you know how filters interplay with CALCULATE, especially nested CALCULATE's.
In the first example, the table 'Admin Categories' does not filter anything, even if you put its columns in a visual; hence you can see values. In the second example, 'Admin List' filters 'Admin Account'. Now, if you put a column from 'Admin List' in a visual, 'Admin Account' gets cross-filtered and the filter is "Gross Margin Level..." Hence, only rows which join to this value are visible in the current context. Since your measures [1] and [2] filter (in their definition) on the field 'Admin Account'[Level 1] and the values you want to filter by have been eliminated by the filter coming from 'Admin List'... well, therefore blank is returned.
@Anonymous
Beautiful!
Thank you very much!
Now I understand more
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 |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
42 | |
33 | |
30 | |
18 | |
18 |