Forum Discussion

kjani's avatar
kjani
Helper I
6 years ago
Solved

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  
  • Hi kjani ,

     

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

     

    Ricardo

5 Replies

  • camargos88's avatar
    camargos88
    Community Champion

    Hi kjani ,

     

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

     

    Check this file: Download PBIX 

     

     

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

    Ricardo

    • kjani's avatar
      kjani
      Helper I

      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.