Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Ayyappa5678
Helper III
Helper III

Dax measure query required of below shared expressions. kindly help me!

Hi Team,
Good Afternoon!
Kindly help me for DAX measure query of below 2 expressions.

1. Sum([ABC] * [DEF] / 100)

2. Sum((case when [AAA]>1 then [AAA] / 100 else [AAA] end) * [XYZ]) / Sum((case when [BBB]>1 then [BBB] / 100 else [BBB] end) * [XYZ])

 

I required measures due to need to call this final values in the card visual. please help me.

2 ACCEPTED SOLUTIONS
Kedar_Pande
Super User
Super User

@Ayyappa5678 

Measure1 = SUMX(YourTable, [ABC] * [DEF] / 100)

 

Measure2 =
DIVIDE(
SUMX(
YourTable,
IF([AAA] > 1, [AAA] / 100, [AAA]) * [XYZ]
),
SUMX(
YourTable,
IF([BBB] > 1, [BBB] / 100, [BBB]) * [XYZ]
)
)

 

💡 If this helped, please give Kudos 👍 or mark it as a Solution .
Best regards,
Kedar
🌐 Connect on LinkedIn

View solution in original post

Poojara_D12
Super User
Super User

Hi @Ayyappa5678 

Can you please try this dax:

Measure_1 = SUMX('TableName', 'TableName'[ABC] * 'TableName'[DEF] / 100)

Measure_2 = DIVIDE(
SUMX('TableName', IF('TableName'[AAA] > 1, 'TableName'[AAA] / 100, 'TableName'[AAA]) * 'TableName'[XYZ]),
SUMX('TableName', IF('TableName'[BBB] > 1, 'TableName'[BBB] / 100, 'TableName'[BBB]) * 'TableName'[XYZ])
)

 

fabric-community-super-user-fy24-25.png

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

5 REPLIES 5
Poojara_D12
Super User
Super User

Hi @Ayyappa5678 

Can you please try this dax:

Measure_1 = SUMX('TableName', 'TableName'[ABC] * 'TableName'[DEF] / 100)

Measure_2 = DIVIDE(
SUMX('TableName', IF('TableName'[AAA] > 1, 'TableName'[AAA] / 100, 'TableName'[AAA]) * 'TableName'[XYZ]),
SUMX('TableName', IF('TableName'[BBB] > 1, 'TableName'[BBB] / 100, 'TableName'[BBB]) * 'TableName'[XYZ])
)

 

fabric-community-super-user-fy24-25.png

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Kedar_Pande
Super User
Super User

@Ayyappa5678 

Measure1 = SUMX(YourTable, [ABC] * [DEF] / 100)

 

Measure2 =
DIVIDE(
SUMX(
YourTable,
IF([AAA] > 1, [AAA] / 100, [AAA]) * [XYZ]
),
SUMX(
YourTable,
IF([BBB] > 1, [BBB] / 100, [BBB]) * [XYZ]
)
)

 

💡 If this helped, please give Kudos 👍 or mark it as a Solution .
Best regards,
Kedar
🌐 Connect on LinkedIn
v-linyulu-msft
Community Support
Community Support

Hi, @Ayyappa5678 
Thanks for reaching out to the Microsoft fabric community forum.

 

Could you please confirm if BeaBF and SachinNandanwar 's responses have resolved your issue? If they have, you might consider accepting their responses as the solution, which will help others find answers more quickly.

vlinyulumsft_0-1737533130250.png

Logically, their responses are the most effective and concise solutions. However, since we are unsure whether [AAA], [XYZ], and [BBB] in your requirement refer to measures or fields, if they are measures, the provided solutions might have some limitations. Therefore, I hope you can confirm whether their responses are effective. If not, please share your data structure, the composition of your measures, and answer my questions. This will help us brainstorm more effectively for your issue.

 

We recommend using GitHub or SharePoint to share your files with us.When uploading a file, please be careful to delete sensitive information. Looking forward to your response.

 

For questions about uploading data, you can try the following links:

How to provide sample data in the Power BI Forum - Microsoft Fabric Community


Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
 

Best Regards,

Leroy Lu

BeaBF
Super User
Super User

@Ayyappa5678 Hi!

 

Measure 1:

Measure1 = SUMX(
TableName,
([ABC] * [DEF]) / 100
)

 

Measure 2:

Measure2 =
DIVIDE(
SUMX(
TableName,
(IF([AAA] > 1, [AAA] / 100, [AAA]) * [XYZ])
),
SUMX(
TableName,
(IF([BBB] > 1, [BBB] / 100, [BBB]) * [XYZ])
),
0
)

 

If it's ok, please accept the answer as solution

BBF

SachinNandanwar
Super User
Super User

Can you post some sample data and the expected output ?

You can try the following to get started :

YourMeasur1 = SUMX(Tbl,(Tbl[ABC]*Tbl[DEF])/100)

YourMeasure2 =

Var _val1= SUMX(Tbl,If(Tbl[AAA]>1,Tbl[AAA]/100,Tbl[AAA])*Tbl[XYZ])

Var _val2= SUMX(Tbl,If(Tbl[AAA]>1, Tbl[AAA]/100,Tbl[AAA])*Tbl[XYZ])

RETURN DIVIDE(_val1/_val2 )

 



Regards,
Sachin
Check out my Blog

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.