Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
I'm trying to combine to measures - Measure 1 & Measure 2 - based on what date it is. This is Measure 3. I want to show Measure 1's value for the days up until today, and Measure 2's value for today and forward. My current solution gives med the wrong total.
My DAX code right now:
Measure 3=
IF(
MAX([DATE]) < TODAY(),
[MEASURE 1],
[MEASURE 2]
)
As you can see I get the same total for Measure 3 as Measure 2. It should be 51, not 76.
FYI, I only have data in my columns to create Measure 1 and Measure 2 as they are in the picture.
Any ideas on what to do?
/Ella
Solved! Go to Solution.
Hi,
MyMeasure :=
VAR MyTable =
SUMMARIZE(
'Table',
'Table'[DATE],
"Value", IF( 'Table'[DATE] < TODAY(), [MEASURE 1], [MEASURE 2] )
)
RETURN
IF(
ISFILTERED( 'Table'[DATE] ),
IF( MAX( 'Table'[DATE] ) < TODAY(), [MEASURE 1], [MEASURE 2] ),
SUMX( MyTable, [Value] )
)
Regards
You're welcome!
Cheers
Hi,
MyMeasure :=
VAR MyTable =
SUMMARIZE(
'Table',
'Table'[DATE],
"Value", IF( 'Table'[DATE] < TODAY(), [MEASURE 1], [MEASURE 2] )
)
RETURN
IF(
ISFILTERED( 'Table'[DATE] ),
IF( MAX( 'Table'[DATE] ) < TODAY(), [MEASURE 1], [MEASURE 2] ),
SUMX( MyTable, [Value] )
)
Regards
Hi Jos! IT IS WORKING 🙂 Thank you so much for such a quick response!!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |