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)
Hi, thanks for the reply.
I am unsure in how to make the quick measure with what appears in the Card1/2.
Card1 value is basically the total, but to the card i apply some filters in order to obtain the result.
So card1 would be total items, up to today.
and card2 would be total items up to today, not complete.
But, as mentioned, both Card1 and 2 are showing values based on filteres applied to the visual.
Is your method requiring that the calculations are made without filters in the visual? or how i can add the card code so i can complete the formula you suggested for the measure?
thanks in advance!
Yes, in this case you will need to pass the filters to the measures.
Could you share your pbix file so i can provide and example?
- DaniLP3 years agoNew Member
Can't share the file, but hopefully screens below help:
Card1 filters:
Card2 filters:
same as above+
Card1 is displaying a 5, and Card2 is displaying a 2 in this case.
is this enough? thanks 🙂
- Anonymous3 years agoNot applicable
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)- DaniLP3 years agoNew Member
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!