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
kanna2404
Regular Visitor

How to create a measure value for only row depending on other 2 rows

Hi 

 

i have a below scenario

 

Col1   Val1

Sales  100

Tax     30

Rev     0

 

Ideally my Rev is combination of Sales and Tax which is not capturing at the table level , so we want to calculate at powerbi level

 

Col1   Val1

Sales  100

Tax     30

Rev     70

 

Like this i have million rows for these three col1 rows but with many other combinations. 

 

So is there a calculation which can do dinamic aggregation of Rev based on Sales - Tax 

 

Please let me know

4 REPLIES 4
quentin_vigne
Solution Sage
Solution Sage

Hi @kanna2404

 

You will have to pivot your table in order to create a calculated column

 

http://radacad.com/pivot-and-unpivot-with-power-bi

 

- Quentin

Thanks for replying.

 

but i dont see how pivot/unpivot will help us for my requirement

 

@kanna2404

 

Because creating a column with the sum of two others columns is very easy to do in PBI and doing what you want to do is not possible.

 

If you can share with us a larger sample of your data so that I show you what I mean

 

- Quentin

Hi

 

thanks for your help, i did the unpivot/pivot and it does work, but the requirement is quite different. 

 

i will try to get the sample data.

 

When i do the pivot table then the two rows are calculated with the formula i mentioned in the column and the values will be static. lets say if i need to create a report with dimensions in the slicer then the values should be calculated dynamically

 

reports should be somthing like this.

 

image.png

 

 

So lets say if i need to determine January data using feb - Aug. can i do it using a calculation in the powerbi. if i change the slicer values then the sales values should be reflected as well.

 

i know the requirement is weird but i hope this might be possible. Please let me know. 

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.