The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Greetingd Actually, i have a Target value.. this target value should change regarding of month, say in october Target value was 45%, in December it is changed to 65%. When i select November, there should be shown acting Limit, which is 45%(October).
How to write a measure?
Solved! Go to Solution.
Hi @Elmarius123 ,
According to your description, I create a sample.
In my understanding, for the months have no Target, your expected result is to display the target of the most recent month before, here's my solution.
Create a measure.
Actual target =
IF (
MAX ( 'Table'[Target] ) <> BLANK (),
MAX ( 'Table'[Target] ),
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Index]
= MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Index] < MAX ( 'Table'[Index] )
&& 'Table'[Target] <> BLANK ()
),
'Table'[Index]
)
),
'Table'[Target]
)
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Elmarius123 ,
According to your description, I create a sample.
In my understanding, for the months have no Target, your expected result is to display the target of the most recent month before, here's my solution.
Create a measure.
Actual target =
IF (
MAX ( 'Table'[Target] ) <> BLANK (),
MAX ( 'Table'[Target] ),
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Index]
= MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Index] < MAX ( 'Table'[Index] )
&& 'Table'[Target] <> BLANK ()
),
'Table'[Index]
)
),
'Table'[Target]
)
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi:
Can you explain further and show some data? Thanks..
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |