Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have created report with DirectQuery connection and made table with dates when system needs to be checked when date is 12 months or more from current date. And done conditional formating on them so it would show when its red then its >12 months, yellow is >9 months but <12 months and green is <9 months old since last check. This is the formula that works if you create custom column in Import type connection, but I cant use it since report has to be DirectQuery connection. Purpose of this formula is to slice table to "Red","Yellow","Green". That meaning if in the system in any of the date reviews or assessments columns there is Red it will only show thous systems that have least one red column in the row. Even if other columns are green or yellow. For Yellow it will show systems that have least one column that is yellow in any of the four columns. And for Green it will show all systems that dont have any Red or Yellow columns, in short all green row. I can create measure using this formula but not custom column in DirectQuery mode. Anyone know how I could archieve thous slicer functions some other way in DirectQuery type report?
Solved! Go to Solution.
I manage to find the solution to the problem. In the orfiginal formula used for Custom column which has SUM DAX function and the CALCULATE function. Since SUM is not supported in the DIrectQuery mode report. Only in measures. I tried to remove it and the CALCULATE function as well, leaving just the IF function. The formale then works for the DirectQuery mode report.
Hi @Anonymous
Conditional formatting won't be affected by the slicer selection, the problem might be other else.
Kindly refer to the similar threads for conditional formatting in direct query:
I see the the misunderstanding. Slicing would be effecting table as it is supposed to do. I dont expect it to effect conditional formating on itself.
I manage to find the solution to the problem. In the orfiginal formula used for Custom column which has SUM DAX function and the CALCULATE function. Since SUM is not supported in the DIrectQuery mode report. Only in measures. I tried to remove it and the CALCULATE function as well, leaving just the IF function. The formale then works for the DirectQuery mode report.
Not sure I got it. But you can create a color measure and use that in conditional formatting, after using field option
Color Date = if(FIRSTNONBLANK('Date'[date],TODAY()) <today(),"lightgreen","red")
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))
Color = if(FIRSTNONBLANK('Date'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))
Refer: https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
I think your solution is for getting columns to be the color I need them. But that isnt the problem I can still do conditional formating on them. Am I right? Only thing that I cant do is to slice them based on how long ago was the check.
User | Count |
---|---|
84 | |
77 | |
72 | |
71 | |
55 |
User | Count |
---|---|
107 | |
98 | |
86 | |
79 | |
67 |