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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
paguy215
Helper III
Helper III

YoY Variance in Matrix

I've tried a lot here and can't seem to get anything to work.  I basically have a list of agents and their total sales by year... I would like a simple variance column at the end of the matrix that lists the name of the agent, their total sales in each year the given closed months (for example if they choose January through November, it would be the sales in each year for those months).   All good with that, but I can't a simple variance (IE subtracting one column from the other)

 

None of the solutions i'm seeing seem to be working.   Would I need to create another table in order to get the visual to work, and what DAX would I need?

2 REPLIES 2
Anonymous
Not applicable

Hi @paguy215 ,

Depending on the information you provide, you can use column subtraction to achieve one column minus another.

You can provide some non-private detail data or pbix files and state what you want to achieve that I can help you.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Yifan Wang

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

Thanks...here is  a look at the style of visual I want to have, where the 'Delta' column would be a subraction of 2023 over 2022.   I have dates both in the source table and a calendar table.   The Years come from a 'Year' column that I created by extracting from the date.   The numbers are sum of sales in those years.  The agent names come from the same table

 

I tried using 

This Year = CALCULATE(count(Query1[count]),filter(ALLSELECTED('Calendar'),'Calendar'[Year]=max('Calendar'[Year])))
 
and a similar one for prior year, and then a variance to subtract This Year - Last Year but it doens't seem to work

 

 20222023Delta
Agent A1422 
Agent B3120 
Agent C1615 
Agent D2937

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.