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.
Hi guys,
I created a dynamic constant line in my report through the use of a parameter.
However, when I plot this in a graph, it shows the value for all my dates (I have a datetable), instead of just the relevant ones.
Is there any way I can do this?
Thanks in advance.
Solved! Go to Solution.
What I meant is to use the filter pane, and in this case I am guessing, you want to filter the empty values of Average Cost
use either both "Is not blank" and "is not 0" or just one of them depending on your returned values. If 0 is actually valid value, then use just "is not blank"
Hi @Anonymous
This should work as well
Target =
IF(
NOT ISEMPTY( 'TableWhereTheAVGCostIs' ),
SELECTEDVALUE( 'Target'[Target] )
)
Thanks guys!! Both solutions work.
Hi @Anonymous
Try this.
Target =
VAR __min = MIN( 'TableWhereTheAVGCostIs'[Date] )
VAR __max = MAX( 'TableWhereTheAVGCostIs'[Date] )
RETURN
CALCULATE(
IF(
NOT ISEMPTY( 'TableWhereTheAVGCostIs' ),
SELECTEDVALUE( 'Target'[Target] )
),
'DateTable'[Date] <= __min,
'DateTable'[Date] >= __max
)
Hi @Anonymous
This should work as well
Target =
IF(
NOT ISEMPTY( 'TableWhereTheAVGCostIs' ),
SELECTEDVALUE( 'Target'[Target] )
)
Hi @Anonymous
How do you calculate you Target as it seems that this is the cause of the issue?
Hi @Mariusz ,
The default of the parameter is the following:
Target Value = SELECTEDVALUE('Target'[Target])
I've tried the following aswell, thinking I could only show the target for the relevant dates, but that also doesn't work.
Target Value = CALCULATE(SELECTEDVALUE('Target'[Target]),FILTER(DateTable,[Average cost]>0))
Try filtering the measure "is not blank" or "is not 0" if you've set blank() = 0, in the filter pane
Unfortunately I can only select my own created measures in this formula, but it should still be relevant. Doesn't work however.
Target Value = CALCULATE(SELECTEDVALUE('Target'[Target]),FILTER(DateTable,NOT(ISBLANK(Average cost]))))
What I meant is to use the filter pane, and in this case I am guessing, you want to filter the empty values of Average Cost
use either both "Is not blank" and "is not 0" or just one of them depending on your returned values. If 0 is actually valid value, then use just "is not blank"
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 |