Forum Discussion
Anonymous
7 years agoNot applicable
Matrix conditional formatting if value is lower then previous year then red
Hey guys, I have a matrix which displays count of shipments per month for 2018 and 2019 so for example the row for june will contain 2 numbers that of 2018 and 2019. Now if the count of shipmen...
- Anonymous7 years ago
Managed to fix it by instead of count using sum in the formale since my table already"counts" the values.
Condittional formatting =SWITCH (TRUE (),SUM('Export'[COUNT] )< CALCULATE (SUM('Export'[COUNT] ),SAMEPERIODLASTYEAR ( DateTable[Date])), "#ff8800")final resultExtra credit to MFelix for all the help provided!
Anonymous
7 years agoNot applicable
Hi MFelix
I have a date table and a shipment_date attribute which contains duplicate dates that have a relationship. Using:
Condittional formatting =
SWITCH (
TRUE (),
COUNT ( Query1[COUNT] )
<= CALCULATE (
COUNT ( Query1[COUNT] ),
SAMEPERIODLASTYEAR ( DateTable[Date].[Date])
), "#ff8800")
In advanced options of conditional formatting based on field value i get the following result:
So somewhere the calculation is wrong only august and september 2019 should be orange
MFelix
Super User
7 years agoHi Anonymous ,
Believe that your issue is regarding the .[DAte] in your formula try the following.
Condittional formatting = SWITCH ( TRUE (), COUNT ( Query1[COUNT] ) <= CALCULATE ( COUNT ( Query1[COUNT] ), SAMEPERIODLASTYEAR ( DateTable[Date]) ), "#ff8800")
Regards,
MFelix