Forum Discussion
Creating Difference between two Values for geographical Chart
- 7 years ago
Hi yashdsin,
If you want to calculate the difference for the product per month, you could create the calcualted columns below.
Please note that you need to change the data type of Index column to be whole number after creating it.
Index = RIGHT('Table'[Sales],1) Difference = VAR a = CALCULATE ( MAX ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) - 1 && 'Table'[Date] = EARLIER ( 'Table'[Date] ) ) ) RETURN IF ( a = BLANK (), BLANK (), a - 'Table'[Value] )Then you could create the matrix like below.
PS: We cannot achieve the same output as that in excel.
Hope this can make sense.
Best Regards,
Cherry
Hi yashdsin ,
It seems that you want to calculate the difference between the two values.
Normally, we could achieve that with three ways. You could choose the way based on your requirement.
1. Create the custom column in query editor ( columnA - column B)
2. Create the calculated column with dax ( columnA - column B)
3. Create the measure with dax.
If you still need help, please share your data sample and your desired output so that we could help further on it.
Best Regards,
Cherry
- yashdsin7 years agoFrequent VisitorHow can I attach a excel file or a pbix file in a question or reply section?
- v-piga-msft7 years agoResident Rockstar
Hi yashdsin ,
Sorry for the delay.
You could upload your data sample or pbix in OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Cherry