Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
User | Count |
---|---|
120 | |
72 | |
69 | |
57 | |
50 |
User | Count |
---|---|
167 | |
82 | |
68 | |
65 | |
53 |