Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Experts
need a measure to do the following, If the date is in the past from Todays date the 1, if the date is the current month then 2, if the date is in future months/periods after the current month then 3
Solved! Go to Solution.
That would be like this.
Formatting =
VAR _Date = MAX ( Dates[Date] )
RETURN
SWITCH(
TRUE(),
_Date <= TODAY(),1,
_Date <= EOMONTH(TODAY(),0),2,
3
)
That would be like this.
Formatting =
VAR _Date = MAX ( Dates[Date] )
RETURN
SWITCH(
TRUE(),
_Date <= TODAY(),1,
_Date <= EOMONTH(TODAY(),0),2,
3
)
@Anonymous
You can add a calculated column like this.
Date Period =
SWITCH (
TRUE(),
[Date] < TODAY(), 1,
[Date] <= EOMONTH ( TODAY(), 0 ), 2,
3
)
Hi jdbuchanan71 i am trying to use the 1,2 and 3 as conditional formatting in a clustered bar chart and its not working correct - hence why i also asked for a measure
thanks - how could we write the above as a measure?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |