March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Need help in DAX. I have one table that contains data related to multipliers for each year, like the follows:
***********************************
Table Multiplier
********************************
Another table is there which has multiple 'values' for the year column like the follows:
******************************************
Table Entities
*************************************************
There's a 1- * relation between the tables based on the year column.
Question: What I have to achieve is access the base/starting"Value" of every entity (base year being 2011-12) and multiply only that value by all the rows in the 'Multiplier' column.
The solution for entity A would look something like below:
Base value remains 20 for every year, then that value gets multiplied by the multiplier which changes every year.
Now, to get the Base value, I used the following to create a measure:
Solved! Go to Solution.
@Anonymous the easiest would be to create a calculated table using the following DAX expression:
Table =
ADDCOLUMNS (
CROSSJOIN (
SELECTCOLUMNS (
Entities,
"Entity", Entities[Entity],
"Value", Entities[Value]
),
Multiplier
),
"Value with Multiplier", [Value] * [Multiplier]
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @Anonymous
Thanks for reaching out to us.
>> So, it is generating correct base value but then not moving forward to multiply each year's multiplier with the base value. I Tried other filter contexts too using KEEPFILTER, ALL within the CALCULATE, but nothing seems to generate the value I want.
Can you fill this table with the expected values? thanks
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-xiaotang Thanks for such a prompt reply. The required table would look like this:
Where in, obviously, the values in the last column would be the result of the multiplication shown.
Regards,
Roopansh
@Anonymous the easiest would be to create a calculated table using the following DAX expression:
Table =
ADDCOLUMNS (
CROSSJOIN (
SELECTCOLUMNS (
Entities,
"Entity", Entities[Entity],
"Value", Entities[Value]
),
Multiplier
),
"Value with Multiplier", [Value] * [Multiplier]
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k , Thanks for your reply. Here's your code with v small changes that worked.
New Index table =
ADDCOLUMNS (
CROSSJOIN (
SELECTCOLUMNS (
Entities,
"Entity", 'Entities'[Entity],
" Base year value", CALCULATE(SUM('Entities'[Value]), 'Entities'[Year] = "2011-12" )
),
Multiplier
),
"Value with Multiplier", [Base year value] * Multiplier[Multiplier]
)
Thanks a bunch man. I'd love to hear from you what should be the best source to learn dax from. I'm currently reading a book by Matt Allington called Supercharge Power bi.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
18 | |
16 | |
13 |