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 Everyone,
I have date table, within which there are columns "Year" and "Current Year".
The DAX for Current Year is =
@Anonymous , Try like
Measure 2 =
CALCULATE(
SUM('Sales'[Quantity]),
FILTER(all( Date_Dimension),
Date_Dimension[Year] = [Selectedyear]
)
)
If you want to default the year on Current year, You need a column
Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA
Hi Ankit,
Thank you for the reply. I used the ALL function in the measure as well. It is resulting in blank.
Is there any other work around?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |