Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 @Anonymous ,
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 @Anonymous ,
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 @Anonymous ,
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |