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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Anonymous
Not applicable

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.