Forum Discussion
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
- FreemanZ
Super User
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.
- Mayayahyaoui218New 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.