Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello Power BI Community.
I am trying to sum two DAX measures, but I need them to be summed only after a certain date (after the line in the image). I tried with an if but it didn't work. I would appreciate if you can give me some ideas to solve this problem.
The measures are SUM OIL REAL(BLS) and FCST OIL.
Thanks in advance for your support.
Hi @CarlosOlmos29 ,
I create a table and two measures as you mentioned.
Then I create a measure and here is the DAX code.
Measure =
CALCULATE (
'Table'[Measure1] + 'Table'[Measure2],
FILTER ( 'Table', 'Table'[Date] > DATE ( 2024, 1, 2 ) )
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@CarlosOlmos29 You can use the below measure to achieve your result, in my case I took the date after 2-Jan-2024, likewise you can write your expected date value.
It worked with the date, but it is not adding up the measurements. It looks like the screenshot below.
This is the measure I am using:
I may be miss understanding but can you not just add a date filter?
How? I tried to use the next measure:
So it looks like its pulling in a list of dates try using the ISONORAFTER function:
ISONORAFTER function (DAX) - DAX | Microsoft Learn
If you can help me with the measure I would aprecciate it 🙂 I don't know how to use it in this case
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |