Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I would like to introduce some dynamic filtering into my dashboard, where I have 2 filters that help select the final value shown. The first filter should narrow down the range the second filter gives the options users can see. I’m having trouble writing the first piece of DAX which will narrow down the selection of measures to select from, and the second which selects the subset from the first subset.
I started with the second filter, which shows values by sales type, but the team then wanted to split this to see Sales including/excluding commission.
The first set of data/measures looks like the following;
| Name | Field | Filter |
| Gross Inc | Gross sales inc commission | Include Commision |
| Gross Ex | Gross sales Ex commission | Include Commision |
| Net Inc | Net sales inc commission | Include Commision |
| Net Ex | Net sales inc commission | Include Commision |
| Signed Inc | Signed sales inc commission | Include Commision |
| Signed Ex | Signed sales inc commission | Include Commision |
Sales Commision =
var _commisionType = SELECTEDVALUE('Include Commision'[ParameterSelect])
RETURN
switch(_commisionType, "Yes", [Sales Inc Commision],
"No", [Sales Ex Commision],
[Blank])
The final subset from the first selection will look like the following;
| Measure Name | Field Name | Filter |
| Gross Sales | Gross Sales | Sales Type |
| Net Sales | Net Sales | Sales Type |
| Signed Sales | Signed Sales | Sales Type |
Reporting Sales =
var _salesType = SELECTEDVALUE('Sales Type'[Name])
RETURN
switch(_salesType, "Gross Sales", [Gross Sales],
"Signed Sales", [Signed Sales"],
"Net Sales", [Net Sales],
[Blank])
I was wondering if someone could advise the best way to structure the data and write the DAX to get the final output to show in my tables and cards for users to see this information?
Thanks
Hi , @dosania
According to your description, you want to create two filters in your dashborad. Right?
The data you provide doesn't look like your raw data, and I don't quite understand your business needs and desired end result.
If you want to create two filters, and the result of the second filter is the result of the first filter, then you need to make sure that there is a hierarchical relationship between the two fields.
And these two fields need to be in one table, because measures cannot be placed in the filter.
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |