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

CALCULATE CLARIFICATION

Hello Guys,,

I just want only a clarification regarding this basic dax systax

Ok let assume I have a TableA and TableB with 
1 to many Relationship
PROBLEM 1
What is the diff of these 2 dax query
= Calculate(DistinctCount(TableBColumn), TableBcolumnx=1,TableBcolumnxx=2,Filter(TableA, TableAColumnm=3)
)
= Calculate(DistinctCount(TableBColumn), TableBcolumnx=1,TableBcolumnxx=2, TableAColumnm=3
)
PROBLEM 2
Ok let assume I have a TableA and TableB with 
1 to many Relationship
I create new table from tableB ,let assume Table C = SummurizeColumn(TablebID,"MIN TEST",MIN(TablebColumnx),"MIN DEPLOYED",MIN(TablebColumnx)
Not the TableC have a relationship with B as Many to 1

= Calculate(DistinctCount(TableBColumnID), TableBcolumnx=B,TableBcolumnxx=2,Filter(TableC, TableCColumnm=3)
)
= Calculate(DistinctCount(TableBColumn), TableBcolumnx=1,TableBcolumnxx=2, TableCColumnm=3
)
I Hope someone will clarify to me
I tried them and different Result 
Thanks in advance

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

PROBLEM 1

The second statement is syntax sugar for: 

=Calculate(DistinctCount(TableBColumn), TableBcolumnx=1,TableBcolumnxx=2, Filter(ALL(TableAColumnm), TableAColumnm=3)
)

The only difference with the first one is the ALL, which overrides existing filters on TableAColumnm

PROBLEM 2

I don't quite follow. It would help if you can share the real example, pbix

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

 

 

Helpful resources

Announcements
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.