Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello community! I created this measure to sum total savings between two dates, [Monthly Updated Transition Date] & [End Transition Date], using an IF statement:
JUL Savings =
IF(DATE(2022, 7, 1) >= MIN('Project Data'[Monthly Updated Transition Date]) && DATE(2022, 7, 1) < MIN('Project Data'[End Transition Date]),
SUMX(VALUES('Project Data'[Concatenate]),
CALCULATE(SUM('Query_Sums'[JUL ]) * SUM('Project Data'[Savings per SKU (per actual case)]))
),
BLANK()
)
While this evaluates a result for each Project Name, it does not evaluate a Total in the matrix visual:
Are there other ways to re-write the DAX, such as by using ISONORAFTER? Thanks so much for your help in advance!
Solved! Go to Solution.
Hi @alvinlinjr
Please try
JUL Savings =
SUMX (
VALUES ( 'Project Data'[Concatenate] ),
CALCULATE (
IF (
DATE ( 2022, 7, 1 ) >= MIN ( 'Project Data'[Monthly Updated Transition Date] )
&& DATE ( 2022, 7, 1 ) < MIN ( 'Project Data'[End Transition Date] ),
SUM ( 'Query_Sums'[JUL ] )
* SUM ( 'Project Data'[Savings per SKU (per actual case)] ),
BLANK ()
)
)
)
Hi @alvinlinjr
Please try
JUL Savings =
SUMX (
VALUES ( 'Project Data'[Concatenate] ),
CALCULATE (
IF (
DATE ( 2022, 7, 1 ) >= MIN ( 'Project Data'[Monthly Updated Transition Date] )
&& DATE ( 2022, 7, 1 ) < MIN ( 'Project Data'[End Transition Date] ),
SUM ( 'Query_Sums'[JUL ] )
* SUM ( 'Project Data'[Savings per SKU (per actual case)] ),
BLANK ()
)
)
)
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |