0

I have this expression which is in qlik sense syntax now i want to change / convert this into power bi dax syntax.. how i do that

 if([Curency] = 'USD',
((Sum({< Fiscal_Year = {'2016','2017'},[Type_Billing] ={'N2','Z2'}>}[BSMA])
/Sum({< Fiscal_Year = {'2016','2017'},[Type_Billing] ={'N2','Z2'}>}[BSA_NETWR]))*vCurrency),
Sum({< Fiscal_Year = {'2016','2017'},[Type_Billing] ={'N2','Z2'}>}[BSMA])
/Sum({< Fiscal_Year = {'2016','2017'},[Type_Billing] ={'N2','Z2'}>}[BSA_NETWR]))

note : currenlty i dont have any power bi file

asked May 20, 2019 at 7:47
2
  • can you possibly explain what this measure is doing? Commented May 20, 2019 at 16:11
  • this is dividing if currency is USD THEN divided (bsma/bsa_netwr) * vcurrency and (bsma/bsa_netwr) one is with vcurrency and the other is without currency .. on the bases of mentioned filters Commented May 22, 2019 at 7:24

1 Answer 1

0

You could try:

VAR USDFilter = 
CALCULATE(
 FILTER(
 ALL('your_table_name'),
 'your_table_name'[Curency] = "USD"
 )
)
VAR Numerator = 
SUMX(
 USDFilter,
 USDFilter[BSMA]
)
VAR Denominator = 
SUMX(
 USDFilter,
 USDFilter[BSA_NETWR]
)
VAR Result = 
IF(
 COUNTROWS(USDFilter) > 0,
 (Numerator / Denominator) * [vCurrency],
 (Numerator / Denominator)
)
RETURN Result

To transcribe code languages, Bard and Chat GPT are a good option.

suxgri
1,0451 gold badge4 silver badges12 bronze badges
answered Feb 12, 2024 at 11:50
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.