Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
twister8889
Helper V
Helper V

Compare list date to max date and filter

Hi guys,

 

I need to create a measure that sum some values, but using the not filter. How do I do this measure in DAX?

FILTER(Table, NOT (TYPE IN {"A","B"})

IF( Date1 <= maxDate,
    sum(value1) + 
      if( date2 >maxDate, sum(value2),0)
,0)

In qlikview i have the formula as below:

Sum (
{<TYPE-= {"A", "B"}>}
If ( Date1 <= maxDate ,
value1+ If ( date2> maxDate, value2, 0)
, 0
)

)



I tried to do in dax:

teste =
CALCULATE(
SUM(Table[value1]),
FILTER(table1,table1[date1]<=[vmaxdate]),
FILTER(table1, NOT (table[type] IN {"A","B"})))
+

CALCULATE(
SUM(table[value2]),
FILTER(table,table[date2]>[vmaxdate]),
FILTER(table, NOT (table[type] IN {"A","B"})))


 
2 REPLIES 2
v-yetao1-msft
Community Support
Community Support

Hi @twister8889 

I am so sorry that I don't fully understand what you mean .

Could you provide some data or sample that can explain the needs you want ? It may help us to deal with the issue easier .

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@twister8889 

Can you share some sample data and the expected result to have a clear understanding of your question?
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.