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
THENNA_41
Post Partisan
Post Partisan

Value has been changed After unpivot the columns in power Query

"My input source is an Excel sheet named 'Source-Reduced'. This sheet has been configured in Power BI. I am attempting to unpivot the following columns.

Total 2024 OB
Total 2023 RF9
Total 2023 RF6
TOTAL RF3 2023
OB23 Total 202

 

Before input, these columns show correct values as per the Excel sheet. After unpivoting, two columns are created: 'Attribute' and 'Value'. When I select a particular attribute column, the values appear significantly higher.

 

Before unpivoting, the total for the following columns is...

 

Total 2024 OB   - 13,27,137
Total 2023 RF9  -14,39,790
Total 2023 RF6 - 14,55,355
TOTAL RF3 2023 -14,14,013
OB23 Total 2023 - 11,97,633

 

 

After above columns unpivoted only selected  in power query i see large value  instead of  orginal values but before unpivot its  showing  correcet value .

 

Also attached power bi sample  with before Pivot and after pivot sheet added with same input source.                                       please find the Link  Power bi Sample + Input File  

 

Looking for support .. thanks in advane..

 

 

 

4 REPLIES 4
bol
Frequent Visitor

@THENNA_41 did you succeed?

THENNA_41
Post Partisan
Post Partisan

@bol  i want 5 columns unpivot afther unpivot there will be only two columns one fore attribute and another for value .. so i want this 5 columns header  want to use slicer in my  report.

bol
Frequent Visitor

This is another question. I answered the first as "how to calculate the same amount".

As far as I understand, you have to create a measure for each of those 5 attributes for all your calculation.
Those 5 measures can be used as "columns" in a table visual (or other visuals).

 

You can also create a new table with your unique ID and adding those DAX formulas as new columns. That would give you 5 column headers.

As of using slicer, you have to be more specific as I don't get it.

bol
Frequent Visitor

Hello,

Here is a formula to calculate one of the sum you are looking for:

 
Sum of Total 2024 OB = CALCULATE(SUM('Source-Reduced - after unpivot'[Value]),FILTER('Source-Reduced - after unpivot','Source-Reduced - after unpivot'[Attribute]="Total 2024 OB - Copy"))

As all your columns are now rows, you need to filter your calculation of each specific row. In this example, I filter each row (previously column) Total 2024 OB - Copy.

I didn't go very far in the verification because your example is a bit complex (no unique key specified to do a comparison).

Hope this helps.

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.