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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Mayayahyaoui218
New Member

DAX with double tables

Hello everyone, 

 

i have a MOM consumption data, I want to choose the month I want to analyse and the period "X" for which I want to compare ( last 30/60/90 days) "Y". 

 

All Dax works fine however if I want to get the value of only the new items for "X" compared to "Y", it compares it to the data in all the other months. 

I'm ready to clarify if needed.
Thank you in advance.

2 REPLIES 2
Mayayahyaoui218
New Member

The Dax related to the first month such as :
Previous Total Cost = SWITCH( TRUE(),
[Selected Metric] = "Vs Last Month" , CALCULATE( [Total Cost],PARALLELPERIOD('Date'[Date],-1,MONTH)),
[Selected Metric] = "Vs Last 60 Days" , CALCULATE( [Total Cost],PARALLELPERIOD('Date'[Date],-2,MONTH))) . 

Same for Previous Qty Shipped and Previous Unit Cost. 
Now If I want to Identify New Items from month to month, Have a products table and I want to ask "FOR THAT SELECTED MONTH AND THAT COMPARISON PERIOD, WHAT IS THE VALUE OF MY NEW ITEMS ?" 

New Products = SUMX(Products,IF([Previous Calculated Unit Cost]=0 && [Calculated Unit Cost]<>0, [Total Cost], BLANK()))

This formula is taking Products from all months, therefor is not identifying any new Items.

FreemanZ
Super User
Super User

hi @Mayayahyaoui218 

could further explain this part:

All Dax works fine however if I want to get the value of only the new items for "X" compared to "Y", it compares it to the data in all the other months. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.