Forum Discussion
Conditional format Card value based on the result on another Card
- Anonymous3 years ago
Then you will need to create a measure with those filters.
Create the ones bellow
# Items = --Bellow put the column refering to the items being summed SUM('table'[column]) Card 1 Measure = CALCULATE( [# Items], DATESINPERIOD('Date'[Date], TODAY() , -1000 , DAY ) ) Card 2 Measure = CALCULATE( [# Items], status[status] in {"Not Started","On Hold","In progress"} ) Conditional formating measure = VAR _carddiff = [Card 2 Measure] - [Card 1 Measure] RETURN IF( _carddiff <> 0, 1, 0)
thanks, i try replicate the measure, but unsure what part of it makes me get error:
Code below (taken from yours, and adjusted to my table names):
FDSColor =
--Bellow put the column refering to the items being summed
SUM('RICEFW'[FDS Status])
Card 1 Measure =
CALCULATE(
[FDSColor],
DATESINPERIOD('Date'[Date], TODAY() , -1000 , DAY )
)
Card 2 Measure =
CALCULATE(
[FDSColor],
RICEFW[FDS Status] in {"Not Started","On Hold","In progress"}
)
Conditional formating measure =
VAR _carddiff = [Card 2 Measure] - [Card 1 Measure]
RETURN
IF( _carddiff <> 0, 1, 0)
Is it Card 2 Status part? unsure if i messed up the translation into my table/column name.
I call measure FDS Color because i will have to do this same measure 5x more times for other 5 different types. so wanted to have some easy time to identify each.
Thanks in advance!
Hi
I guess you posting all that code in the same measure.
You need to create each measure separadly in order to make it work.
If you want to learn more about measures in power BI you can watch the video bellow
https://www.youtube.com/watch?v=9VtaOAM2oOM&ab_channel=EnterpriseDNA
- DaniLP3 years agoNew Member
Ill have a look, thanks for your help! 🙂