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
kjani
Helper I
Helper I

Help in building a template

I would like your help in building this in PowerBI Desktop. I have a dataset with multiple variables. I need to calculate difference in values based on scenario (e.g. 1_Base vs. 2_Low) for each Name (UC, GR etc.). Here is sample input data. Can you help with a simplest desgin in PowerBI? I would like to have output mostly in tables (examples below) and a few charts on what changed.

 

I will have more than 2 scenarios in future, so would like to have flexibility to compare one scenario vs. other. Thanks in advance.

 

Input data:

Revenue CenterCAC CodeCAC DescChannel CodeChannel DescModel TypeRankRank NameScenarioNameValue
Central Zone5Large Store50Channel ANon 50050Channel A1_BaseUC     62
Central Zone5Large Store50Channel ANon 50050Channel A1_BaseGR  242
Central Zone5Large Store30Channel BTop 50051Channel B1_BaseUC     14
Central Zone5Large Store30Channel BTop 50051Channel B1_BaseGR     23
Central Zone5Large Store10Channel CNon 50052Channel C1_BaseUC       5
Central Zone5Large Store10Channel CNon 50052Channel C1_BaseGR     38
Central Zone5Large Store20Channel DTop 50053Channel D1_BaseUC  162
Central Zone5Large Store20Channel DTop 50053Channel D1_BaseGR  252
East Zone5Small Store50Channel ANon 50050Channel A1_BaseUC     62
East Zone5Small Store50Channel ANon 50050Channel A1_BaseGR  242
East Zone5Small Store30Channel BTop 50051Channel B1_BaseUC     14
East Zone5Small Store30Channel BTop 50051Channel B1_BaseGR     23
East Zone5Small Store10Channel CNon 50052Channel C1_BaseUC       5
East Zone5Small Store10Channel CNon 50052Channel C1_BaseGR     38
East Zone5Small Store20Channel DTop 50053Channel D1_BaseUC  162
East Zone5Small Store20Channel DTop 50053Channel D1_BaseGR  252
           
Central Zone5Large Store50Channel ANon 50050Channel A2_LowUC     56
Central Zone5Large Store50Channel ANon 50050Channel A2_LowGR  218
Central Zone5Large Store30Channel BTop 50051Channel B2_LowUC     13
Central Zone5Large Store30Channel BTop 50051Channel B2_LowGR     20
Central Zone5Large Store10Channel CNon 50052Channel C2_LowUC       5
Central Zone5Large Store10Channel CNon 50052Channel C2_LowGR     35
Central Zone5Large Store20Channel DTop 50053Channel D2_LowUC  146
Central Zone5Large Store20Channel DTop 50053Channel D2_LowGR  227
East Zone5Small Store50Channel ANon 50050Channel A2_LowUC     56
East Zone5Small Store50Channel ANon 50050Channel A2_LowGR  218
East Zone5Small Store30Channel BTop 50051Channel B2_LowUC     13
East Zone5Small Store30Channel BTop 50051Channel B2_LowGR     20
East Zone5Small Store10Channel CNon 50052Channel C2_LowUC       5
East Zone5Small Store10Channel CNon 50052Channel C2_LowGR     35
East Zone5Small Store20Channel DTop 50053Channel D2_LowUC  146
East Zone5Small Store20Channel DTop 50053Channel D2_LowGR  227

 

Output calculations:

1_Base vs. 2_Low variance 
By ChannelUCGR
Channel A  
Channel B  
Channel C  
Channel D  
Total  

 

1_Base vs. 2_Low variance 
By Revenue CenterUCGR
Central Zone  
East Zone  
   
   
Total  

 

1_Base vs. 2_Low variance 
By Model TypeUCGR
Top 500  
Non 500  
   
   
Total  
1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @kjani ,

 

Check the code for the measure. It is subtracting the values and get the absolute value.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

5 REPLIES 5
camargos88
Community Champion
Community Champion

Hi @kjani ,

 

You just need to drag a matrix visualization to show it:

 

Check this file: Download PBIX 

 

Capture.PNG

 

If you consider it as a solution, please mark as a solution and kudos.

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Thank you so much for quick response. However, I need the difference between the two scenarios. Your output is adding instead of subtracting. Thanks again.

camargos88
Community Champion
Community Champion

Hi @kjani ,

 

Check the file again, I've updated it.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



I am sorry, it's still adding the numbers. I need to see the difference in values between two scenarios (1_Base vs. 2_Low). Can you help? Thanks

camargos88
Community Champion
Community Champion

Hi @kjani ,

 

Check the code for the measure. It is subtracting the values and get the absolute value.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



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.