Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
User | Count |
---|---|
141 | |
70 | |
69 | |
53 | |
52 |
User | Count |
---|---|
208 | |
94 | |
64 | |
60 | |
57 |