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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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?
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |