Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a measure I need to create that will sum two values but not sum them if the date is a particular date range. I don't want to exclude the data from being in the total, but I don't want it to sum the 2 values together. Can anyone assist with the syntax of the Dax measure? Sample of the data attached. I would like to sum donatyion qty - ALL with Donor count but NOT sum if the date is X. If the date is X, then the value will be only the Donor count filed.
Solved! Go to Solution.
maybe you can try ,
=if(max('Date')=date(2023,3,22)||max('Date')=date(2023,3,23),[Donor Count], [Total Store Donor Count])
Proud to be a Super User!
This is essentially an IF statement impacting the line values but not the total. Assuming dates to exclude is a hard coded range somethingl like this:
Total * =
VAR DatesToExclude = CALENDAR ( DATE ( 2020, 3, 4 ), DATE ( 2020, 3, 10 ) )
VAR CurrentDate = SELECTEDVALUE ( Dates[Date] )
RETURN
IF ( CurrentDate IN DatesToExclude, [Donor Count], [Donor Count] + [Donation ALL] )
This is essentially an IF statement impacting the line values but not the total. Assuming dates to exclude is a hard coded range somethingl like this:
Total * =
VAR DatesToExclude = CALENDAR ( DATE ( 2020, 3, 4 ), DATE ( 2020, 3, 10 ) )
VAR CurrentDate = SELECTEDVALUE ( Dates[Date] )
RETURN
IF ( CurrentDate IN DatesToExclude, [Donor Count], [Donor Count] + [Donation ALL] )
maybe you can try ,
=if(max('Date')=date(2023,3,22)||max('Date')=date(2023,3,23),[Donor Count], [Total Store Donor Count])
Proud to be a Super User!
Thanks.
you are welcome
Proud to be a Super User!
User | Count |
---|---|
92 | |
85 | |
76 | |
66 | |
62 |
User | Count |
---|---|
110 | |
96 | |
95 | |
64 | |
57 |