Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello!
I need some DAX help! I have a table such as below and I need to create a calculated column called Product Group, that switches between two options, based on a filter from a single-select slicer:
Product | Sales | Product Group |
A | $100 | A and B |
B | $500 | Can be both ([A and B], or [B and C]) |
C | $300 | B and C |
The slicer will have only two options:
KPI for Sum of sales when [A and B] are selected: $600
KPI for Sum of sales when [B and C] are selected: $800
Thank you!
Solved! Go to Solution.
Hi @databeast
You can refer to following example.
Choose "Enter data" then input the data
Then creata a measure in table and put the Product Group column to the slicer
Measure = var a={LEFT(MAX('Table (2)'[Product Group]),1),RIGHT(MAX('Table (2)'[Product Group]),1)}
return CALCULATE(SUM('Table'[Sales]),'Table'[Product] in a)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @databeast
You can refer to following example.
Choose "Enter data" then input the data
Then creata a measure in table and put the Product Group column to the slicer
Measure = var a={LEFT(MAX('Table (2)'[Product Group]),1),RIGHT(MAX('Table (2)'[Product Group]),1)}
return CALCULATE(SUM('Table'[Sales]),'Table'[Product] in a)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |