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
Benedicts
Frequent Visitor

Compare two categories

I have a table with sales by agent and  season like this:

agentseasonsales
agent1AI1812
agent2AI1823
agent3AI1832
agent1AI1934
agent2AI1923
agent4AI1945

 

I try to obtain a power bi matrix as:

agentAI18AI19delta
agent1123422
agent223230
agent332 -32
agent4 4545
Total6710235

 

Can i have an help, please?

Thanks

2 REPLIES 2
tex628
Community Champion
Community Champion

Duplicate the query, 

Filter so that you only have one season in each query,
Merge the query on agent,

Finally create the delta.

 

Hope this helps!


Connect on LinkedIn

sorry but,

i have a filter, where the user can choose the season and with a lookvalue function i find the last season.

So i writed two measure to calculate the quantity like this:

 

QUANTITA' LAST SEASON =
VAR LASTSEASON = [selected stagione last year]
RETURN
CALCULATE(SUM(fatordspedfatt[Quantità Ordinato]);
ALL(FatOrdSpedFatt[Agent]);
ALL(fatordspedfatt[Season]);
fatordspedfatt[Season]= LASTSEASON)

 

Cattura.JPG

 

The problem is that in the "last season" colum, the value are present only when there is a value in a "quantity season" colum.

I like use the measure to obtain the goal, it's possible?

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.