Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I Want to fetch the Values for all the months in the slicer from the below dax1.
i have 2 dax's where dax1 is fetching correct values(totals) but month slicer for prev month selection displaying blank and other dax2 not correct value (totals) but fetching for all months with month slicer. so can anyone help me in modifying DAX1 (HC new).
dax used are:
Dax1(prev month and year not fetching values but value is correct)
HC new =
VAR MaxActivityDate = MAX(sales_snap[Activitydate])
RETURN
IF(
TODAY() = MaxActivityDate,
CALCULATE(
SUM(sales_snap[HeadCount]),
FILTER(
sales_snap,
sales_snap[Activitydate] = MaxActivityDate
)
)
)
DAX2(prev month and year fetching values but value is incorrect)
Solved! Go to Solution.
HI @iyanaardnas1,
You can try to use the following measure formulas if it suitable for your requirement:
HC new =
VAR MaxActivityDate =
MAX ( sales_snap[Activitydate] )
RETURN
IF (
TODAY () = MaxActivityDate,
CALCULATE (
SUM ( sales_snap[HeadCount] ),
FILTER (
ALLSELECTED ( sales_snap ),
sales_snap[Activitydate] = MaxActivityDate
)
)
)
Regards,
Xiaoxin Sheng
HI @iyanaardnas1,
You can try to use the following measure formulas if it suitable for your requirement:
HC new =
VAR MaxActivityDate =
MAX ( sales_snap[Activitydate] )
RETURN
IF (
TODAY () = MaxActivityDate,
CALCULATE (
SUM ( sales_snap[HeadCount] ),
FILTER (
ALLSELECTED ( sales_snap ),
sales_snap[Activitydate] = MaxActivityDate
)
)
)
Regards,
Xiaoxin Sheng
any answers?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |