The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |