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
Hello,
I have a data table as follows and I am trying to use the Parameters functionality to dynamically switch between showing the Amount by Department and Location columns. In addition to this, I need to filter out all rows where the Days Late is blank when the user wants to view the breakdown by Department.
Data Table - Test:
DepartmentDays LateAmountLocation
| Sales | 10 | US | |
| Marketing | 7 Days | 20 | CA |
| Sales | 8 Days | 10 | AUS |
| Marketing | 25 | UK | |
| R&D | 10Days | 565 | US |
| R&D | 897 | CA | |
| Sales | 979 | AUS |
So, what I am trying to do is, use a Data Filtering measure to only show the rows where the Days Late columns <> null:
Thank you!
Solved! Go to Solution.
Hi @newpbiuser01 ,
I created a sample pbix file(see the attachment), please check if that is what you want. You can create a measure as below, and put this measure onto the bar chart to replace the original value field.
Measure =
VAR DataBy =
SELECTEDVALUE ( 'Parameter'[Parameter Fields] )
RETURN
SWITCH (
TRUE (),
DataBy = "'Test'[Department]", CALCULATE ( SUM ( 'Test'[Amount] ), 'Test'[Days Late] <> BLANK () ),
DataBy = "'Test'[Location]", SUM ( 'Test'[Amount] )
)
Best Regards
Hi @newpbiuser01 ,
I created a sample pbix file(see the attachment), please check if that is what you want. You can create a measure as below, and put this measure onto the bar chart to replace the original value field.
Measure =
VAR DataBy =
SELECTEDVALUE ( 'Parameter'[Parameter Fields] )
RETURN
SWITCH (
TRUE (),
DataBy = "'Test'[Department]", CALCULATE ( SUM ( 'Test'[Amount] ), 'Test'[Days Late] <> BLANK () ),
DataBy = "'Test'[Location]", SUM ( 'Test'[Amount] )
)
Best Regards
Thank you @Anonymous! That worked like a charm.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |