Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I need some help with a dax calculation. I have the following type of data which I’m using in a Line chart and in a Control Chart:
Date (dd-mm-yyyy) | Title | Amount | Target |
04-03-2022 | AA | 5 | 10 |
05-03-2022 | AA | 10 | 20 |
06-03-2022 | AA | 0 | 30 |
07-03-2022 | AA | 15 |
|
08-03-2022 | AA |
| 25 |
09-03-2022 | AA |
| 25 |
*Every day the Amount field is updated with new information.
Currently, my chart shows all rows with Target, even the Amount cell is empty. I need a dax column/measure to filter my chart, to show only the Target where the Amount field is NOT empty (in the example to load data only to March 7th incl.). If Amount is equal to zero, the target should be displayed. And if there is Amount value, but the target is empty, to still load the row.
Thank you.
Solved! Go to Solution.
I'd actually meant to apply the filter to the visual using the filter pane, you can choose Advanced filtering -> is not blank.
However, you could try changing your filter to
Column = IF ( NOT( ISBLANK( 'Table'[Amount] ) ), 'Table'[Target], 99999 )
as BLANK() does equate to 0 when using comparison operators.
Add a filter to the chart to only show items where Amount is not blank.
Hi @johnt75,
Thank you for the suggestion, but this doesn't work.
I tried to use this calc as a hidden filter: Column = if('Table'[Amount] <> blank(), 'Table'[Target],99999). It 'almost' work fine, because it filters the days, but when Actual is equal to zero, it accepts it as an empty field and doesn't show it.
I'd actually meant to apply the filter to the visual using the filter pane, you can choose Advanced filtering -> is not blank.
However, you could try changing your filter to
Column = IF ( NOT( ISBLANK( 'Table'[Amount] ) ), 'Table'[Target], 99999 )
as BLANK() does equate to 0 when using comparison operators.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |