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,
I have fact table "Test" and one disconnected table "Language".
Language table has contry and languagecode column where Belgium has two languagecode . we have RLS applied on this so that customer sees only their country language type in slicer .
So if customer selects languageType "nl-be" then it should filter responses for both language code "nl-be" and "en".
Similarly, on selection of "fr-be", data should filter for "fr-be" and "en".
Below is the sample data of Fact table
I have written below DAX measure to achieve this which works fine on latest data where we added translation for response .
For old data it should show everything on selection of any language type
I am looking forward to hear from you all. Please help me with this requirement / share idea how to achieve this please
Thanks in advance!
Solved! Go to Solution.
What if you inverted the logic and told it what not to include?
SWITCH (
SELECTEDVALUE ( 'Language'[LanguageType] ),
"nl-be", CALCULATE ( MAX ( Test[response] ), Test[languagecode] <> "fr-be" ),
"fr-be", CALCULATE ( MAX ( Test[response] ), Test[languagecode] <> "nl-be" ),
MAX ( Test[response] )
)
What if you inverted the logic and told it what not to include?
SWITCH (
SELECTEDVALUE ( 'Language'[LanguageType] ),
"nl-be", CALCULATE ( MAX ( Test[response] ), Test[languagecode] <> "fr-be" ),
"fr-be", CALCULATE ( MAX ( Test[response] ), Test[languagecode] <> "nl-be" ),
MAX ( Test[response] )
)
@AlexisOlson Great ! Thanks very much it's working abosultely fine with test data .
I will try in my real power bi dataset.
Thanks a lot for solution . Very much appreciated !
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 | |
20 | |
19 | |
15 | |
15 |
User | Count |
---|---|
46 | |
28 | |
25 | |
18 | |
17 |