Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello All,
I have a tableau dashboard where I have parameter having values like US-Canada,APAC and Overall.
And I have department values like Central,Georgia,Hyd and Pune
My requirement is If I select region as US-Canada then I need to show only Central,Georgia
If I select region as APAC then I need to show only Hyd,Pune
If I select region as Overall then I need to show All 4.i.e, Central,Georgia,Hyd,Pune
Below is my logic in Tableau and I am not sure how to write in power BI as I am new.
Could some one help how to write
I created a table inside power BI for the parameter values and not sure how to write after that
CASE [Region]
when 'US-Canada' then
[Department] = 'Central' or
[Department]= 'Georgia'
when 'APAC' then
[Department] = 'Hyd' or
[Department]= 'Pune'
when 'Overall' then
[Department] = 'Central' or
[Department] = 'Georgia' or
[Department]= 'Hyd' or
[Department] = 'Pune'
END
Solved! Go to Solution.
Hi @Sathvik123 ,
Please try to Create a new table for slicer:
For Slicer =
FILTER (
CROSSJOIN (
{ "US-Canada", "APAC", "Overall" },
SUMMARIZE ( 'Table', [Department] )
),
SWITCH (
[Value],
"APAC",
[Department] = "Hyd"
|| [Department] = "Pune",
"US-Canada",
[Department] = "Central"
|| [Department] = "Georgia",
[Department] = "Hyd"
|| [Department] = "Pune"
|| [Department] = "Central"
|| [Department] = "Georgia"
)
)
Then manage the relationship between the tables:
Then apply 'For Slicer'[Value] and 'For Slicer'[Department] to slicers
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sathvik123 ,
Please try to Create a new table for slicer:
For Slicer =
FILTER (
CROSSJOIN (
{ "US-Canada", "APAC", "Overall" },
SUMMARIZE ( 'Table', [Department] )
),
SWITCH (
[Value],
"APAC",
[Department] = "Hyd"
|| [Department] = "Pune",
"US-Canada",
[Department] = "Central"
|| [Department] = "Georgia",
[Department] = "Hyd"
|| [Department] = "Pune"
|| [Department] = "Central"
|| [Department] = "Georgia"
)
)
Then manage the relationship between the tables:
Then apply 'For Slicer'[Value] and 'For Slicer'[Department] to slicers
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sathvik123 ,
Based on your description, I have created a simple sample:
Please try:
First create a new table for slicer
Then apply it to slicer and turn on single select :
Create a measure and apply to the visual:
Flag =
SWITCH (
SELECTEDVALUE ( 'For Slicer'[Value] ),
"APAC",
IF (
MAX ( 'Table'[Department] ) = "Hyd"
|| MAX ( 'Table'[Department] ) = "Pune",
1,
0
),
"US-Canada",
IF (
MAX ( 'Table'[Department] ) = "Central"
|| MAX ( 'Table'[Department] ) = "Georgia",
1,
0
),
1
)
Apply it to the filter:
Final output:
Refer to : IF function (DAX) - DAX | Microsoft Docs
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-jianboli-msft ,
Thanks for your answer.We are almost done
But my requirement here is I need to show the departments as filters to the report.(Need to show them in a slicer )
You would create groups in Power BI for this, no need for DAX
User | Count |
---|---|
84 | |
81 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
105 | |
96 | |
86 | |
68 |