Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, i have a slicer for datetime as shown below
i want to make a card transparent when i select a date any time from 4/1/2015 to 5/1/2015.
for other dates (e.g. < 4/1/15 and >5/1/15) it will not turn transparent
this is the measure i wrote for the background color for the card and it does not work.
may i know whats the correct way to write the condition? thanks
Solved! Go to Solution.
Hi @weijunawj ,
The understanding is not detailed enough, now adjusted to:
Use the following measure:
color = IF(SELECTEDVALUE('Table'[Date])>=DATE("2015","1","4")&&SELECTEDVALUE('Table'[Date])<=DATE("2015","1","5"),"#F0F0F0","#000000")
configure like below:
Final get:
Wish it is helpful for you!
Best Regards
Lucien
Hi @weijunawj ,
The understanding is not detailed enough, now adjusted to:
Use the following measure:
color = IF(SELECTEDVALUE('Table'[Date])>=DATE("2015","1","4")&&SELECTEDVALUE('Table'[Date])<=DATE("2015","1","5"),"#F0F0F0","#000000")
configure like below:
Final get:
Wish it is helpful for you!
Best Regards
Lucien
嗨 @weijunawj ,
Test like the below:
color = IF(SELECTEDVALUE('DATE'[Date])=DATE("2015","3","1"),"#F0F0F0","000000")
configure like below:
Wish it is helpful for you!
Best Regards
Lucien
Dax look fine.
You can try to apply both conditions in the Dax and give result as 1,2,3.
Then in data field apply conditional formatting on these results.
Hope this helps.
@weijunawj , seems fine, my be you need < or > in place of =
Switch( true() ,
selectedvalue(Table[Date]) < = date(2015,1,1) ,
"#FFFFFF00",
"#FFFFFF"
)
User | Count |
---|---|
93 | |
85 | |
78 | |
68 | |
63 |
User | Count |
---|---|
113 | |
99 | |
96 | |
64 | |
58 |