This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi
I am trying to create 2 cards with same value and linked them with 2 slicers - (quarter and year) and used edit interaction so, I can compare 2 different qurter and then color code both card visuals on the baises of greater than-red, equals to=yellow and less than-green by dax. But even though cards shows different value color code is appearing for equals only.
Dax:
Solved! Go to Solution.
Hi, @Tushar_IG
You can try the following methods. In order to make the two slicers work separately, a new date table needs to be created.
Table:
Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
Measure:
1st # of Trials = CALCULATE(SUM('Table'[# of Trials]))2nd # of Trials =
CALCULATE (
SUM ( 'Table'[# of Trials] ),
FILTER (
ALL ( 'Table' ),
[Year] = SELECTEDVALUE ( 'Date'[Year] )
&& [Quarter] = SELECTEDVALUE ( 'Date'[Quarter] )
)
)
Measure about the color does not need to be changed. Measure needs to be added to the background color of the card.
1st color = IF([1st # of Trials] > [2nd # of Trials], "Red",
IF([1st # of Trials] = [2nd # of Trials], "Yellow",
IF([1st # of Trials] < [2nd # of Trials], "Green")))2nd color = IF([2nd # of Trials] > [1st # of Trials], "Red",
IF([2nd # of Trials] = [1st # of Trials], "Yellow",
IF([2nd # of Trials] < [1st # of Trials], "Green")))
Set the background color for the two cards separately, and you can filter the slicer to compare the quarterly values.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Tushar_IG
You can try the following methods. In order to make the two slicers work separately, a new date table needs to be created.
Table:
Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
Measure:
1st # of Trials = CALCULATE(SUM('Table'[# of Trials]))2nd # of Trials =
CALCULATE (
SUM ( 'Table'[# of Trials] ),
FILTER (
ALL ( 'Table' ),
[Year] = SELECTEDVALUE ( 'Date'[Year] )
&& [Quarter] = SELECTEDVALUE ( 'Date'[Quarter] )
)
)
Measure about the color does not need to be changed. Measure needs to be added to the background color of the card.
1st color = IF([1st # of Trials] > [2nd # of Trials], "Red",
IF([1st # of Trials] = [2nd # of Trials], "Yellow",
IF([1st # of Trials] < [2nd # of Trials], "Green")))2nd color = IF([2nd # of Trials] > [1st # of Trials], "Red",
IF([2nd # of Trials] = [1st # of Trials], "Yellow",
IF([2nd # of Trials] < [1st # of Trials], "Green")))
Set the background color for the two cards separately, and you can filter the slicer to compare the quarterly values.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 40 | |
| 39 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 76 | |
| 61 | |
| 34 | |
| 30 | |
| 25 |