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

DAX row calculation

Hi All,

 

I'm trying to find a way to solve the following problem and could really use some help..

 

As you can see in the screenshot below, I have a table with payment amounts and (in the two last rows) day amounts. These two types of amounts (or units) were originally combined in a single column which was pretty confusing.

 

However, I managed to create a new measure 'budget' which returns day amounts where the category is about 'Days' and returns 0's or empty fields where we're not talking about 'Days' but payment amounts. 

 

Schermafbeelding 2017-09-01 om 12.23.59.png

 

What I'm trying to achieve now is a row-based calculation where I can divide a payment amount by 'A Days' or 'B Days' etc. etc..

(Payment Amount / A Days)

So basically; how do I transpose the row A Days (value = 22865) into a column that shows this value for each 'payment category'?

 

Any help is very much appreciated!

 

Thanks and kind regards

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @haassiej,

 

Based on my understanding, you want to divide column C= Budget (Measure) by the Budget values hen it's equal to " A Days", right?

 

You can try to create a measure like this:

 

Column = var ADays=CALCULATE([Budget],FILTER(ALL('<TableName>'),Accountgroups="A Days"))
return
DIVIDE([Budget], ADays)

 

 

Best Regards,
QiuyunYu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @haassiej,

 

Based on my understanding, you want to divide column C= Budget (Measure) by the Budget values hen it's equal to " A Days", right?

 

You can try to create a measure like this:

 

Column = var ADays=CALCULATE([Budget],FILTER(ALL('<TableName>'),Accountgroups="A Days"))
return
DIVIDE([Budget], ADays)

 

 

Best Regards,
QiuyunYu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
haassiej
Helper I
Helper I

@Greg_Deckler

 

From left to right:

Column 1 = Accountgroups

 

Schermafbeelding 2017-09-01 om 15.50.09.png

 

A = Actuals (Measure)

B = Actuals YTD (Measure)

C = Budget (Measure)

D = Budgets YTD (Measure)

 

Budget = Statistical measure of day numbers

 

The statistical days were booked on 2 accountgroups (A days and B days). I would like to calculate with these values. As Example for accountgroup 10:

Column C   (divide)     Column Budget
Budget          /             Statistical days (Budget column)

 

 

Greg_Deckler
Super User
Super User

Can you provide some sample data and your formulas? What is A Days, is that a column, measure or ?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.