Forum Discussion
Help! Heat map using Matrix visual
I have a Matrix visual that shows percentage % in Qtuarterly and monthly in Excel as bolow and I have applied gradient colounr in Excel like below.
this pictures indicates that after completion of Quarter it should show Gray colour in coloumn and remaining coloums the gradient colour should be applied.
like same for months also.
I have used the below DAX measure to set a Field Value in Conditional Formating.
7 Replies
- AnonymousNot applicable
Hi Anonymous ,
Try changing the IF statement to a SWITCH statement, as the IF statement may have dependencies that cause conditions to not match exactly.
SWITCH function (DAX) - DAX | Microsoft Learn
Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
How can I convert above DAX measure using SWITCH function.
- AnonymousNot applicable
How can I convert above DAX measure using SWITCH function.
- AnonymousNot applicable
I used below measure and it is worked
BackgroundColor =---- VAR CurrentMonthNumber = MONTH(TODAY())VAR SelectedMonthNumber = MAX('M_DATE_D'[Ter Month])VAR Percentage = 'S_SPL_QMR_DO_WEEKLY_2024_F'[Offer COS/24]RETURNIF( SelectedMonthNumber=1 ,"#CCCCCC",IF(AND(SelectedMonthNumber=0,Percentage=0), "#FA8B8B" ,IF(SelectedMonthNumber=0 && Percentage>0 && Percentage<0.061,"#F9AFB2","#FDF09F"))),But it should take min and max percentages and should apply gradient- AnonymousNot applicable
Hi Anonymous ,
When using field conditional formatting, the gradient does not take effect directly, you have to refine the DAX gradient yourself.
Best regards,
Community Support Team_ Scott Chang- AnonymousNot applicable
Hi, Soory for asking..
I can't understaand, Could you please explain how can we do that