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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
punnas1
Helper II
Helper II

Variances Dax measure

Hi All,

 

I have following data and i wanted to calcuate the following variance measures by product.

and i have to show zone wise variances in matrix table.

 

Data Table

customer, Zone, Product, LY Qty, LY Price, LY Sale, CY Qty, CY Price, CY Sales

Variance Measures by product

Qty Change = if ( And(LY Qty<>0,CY Qty<>0),CY Qty - LY Qty,0)* LY Price

New Prod Val = if ( And(LY Qty=0,CY Qty<>0),CY Qty - LY Qty,0)*CY Price

Disc Prod Val = if ( And(LY Qty<>0,CY Qty=0),CY Qty - LY Qty,0)*PY Price

Price Change = if ( And(LY Qty<>0,CY Qty<>0),CY Price - LY Price,0)*CY Qty

 

thanks,

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @punnas1 ,

 

Please check if the attached .pbix file is what you want.

region.JPG

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

9 REPLIES 9
punnas1
Helper II
Helper II

Hi @Icey  Thank you

I could not able to download the attaechement, can you please send the link of file.

punnas1_0-1608201879810.png

 

Icey
Community Support
Community Support

Hi @punnas1 ,

 

I have upload the file on OneDrive for Business. And here is the link.

 

 

Best regards

Icey

punnas1
Helper II
Helper II
Icey
Community Support
Community Support

Hi @punnas1 ,

 

Please check if the attached .pbix file is what you want.

region.JPG

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

punnas1
Helper II
Helper II

Yes, I have date column but i had summarized sample data.

Pls help with date column

Hi,

Share the download link of that file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
punnas1
Helper II
Helper II

Hi @Fowmy,

 

Sample data uploaded in following in link, Pls help

https://drive.google.com/file/d/13NiYWjPCyi7EQmgnqdeDJbtnvhF5f9w8/view?usp=sharing

 

Thank you.

Hi,

With a Date column, it will become quite cumbersome to write the required measures.  Do you not have a Date column?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Fowmy
Super User
Super User

@punnas1 

To getter a better understanding of your question, please share some dummy data with the expected results showing how the calculation needs to be done. 

You can save your files in OneDrive, Google Drive, or any other cloud sharing platform and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.