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
malcolmwunOW
Frequent Visitor

Calendar table to filter 2 tables that have existing Relationship aka Lapse New Trading

I have 3 tables that has ambiguous relations - where the date table filters 2 table. 

At the same time the Status Table needs to filter Fact Sales.

My attemtp to overcome this, I wrote the following DAX but did not work

Total Sales = Calculate(sum(SALES),

                    TREATEAS(SUMMARIZE(Fact Sales [CUSTOMER]),Status Table [CUSTOMER]))

The desired outcome is in Image below. thank you in advanced

 

malcolmwunOW_0-1741238296480.png

 

 

 

 

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

Hi, @malcolmwunOW 

Try below measure

Total Sales = 
Calculate(
  sum('fact sales'[SALES]),
  TREATEAS(all(Status Table [CUSTOMER]),Fact Sales [CUSTOMER]))


If still does not work then please provide Screenshot of your data model


Best Regards,
Dangar

 

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

View solution in original post

6 REPLIES 6
v-menakakota
Community Support
Community Support

Hi @malcolmwunOW ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @Eisha ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

Hi @malcolmwunOW ,

I hope the provided information by mdaatifraza5556  is  helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.

Thank you

mdaatifraza5556
Solution Specialist
Solution Specialist

Hi @malcolmwunOW 

You can use my first approach which is using LOOKUPVALUE DAX.
OR
correct your DAXusing below DAX.

saless =
    CALCULATE(
        SUM('Fact Sales'[Sales]),
        TREATAS(VALUES('Fact Sales'[Cust]), 'Status Table'[Cust]))
mdaatifraza5556
Solution Specialist
Solution Specialist

Hi @malcolmwunOW 
Remove the relationship between fact and status and in the fact table bring the status column using LOOKUPVALUE.
checkout the below DAX

status = LOOKUPVALUE('Status Table'[Status], 'Status Table'[MTH], 'Fact Sales'[MTH], 'Status Table'[Cust], 'Fact Sales'[Cust])

Drag the column from the calendar and the fact.


Screenshot 2025-03-06 113957.png
Dangar332
Super User
Super User

Hi, @malcolmwunOW 

Try below measure

Total Sales = 
Calculate(
  sum('fact sales'[SALES]),
  TREATEAS(all(Status Table [CUSTOMER]),Fact Sales [CUSTOMER]))


If still does not work then please provide Screenshot of your data model


Best Regards,
Dangar

 

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

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.

Top Solution Authors