Forum Discussion
To write a measure in Power Bi
Hi, I am migrating qlikview to Power Bi. I have following expression in qliview that needs to be converted in Power BI
((SUM(IF(Mode_group_3 = 'AirImport',[ChglWt(KG)],0)))/1000) How to write above expression in Power BI.
3 Replies
- AnonymousNot applicable
can you tell me .what exactly output this function will give you so it will help me to understand .
what i understood is
((SUM(IF(Mode_group_3 = 'AirImport',[ChglWt(KG)],0)))/1000)
when mode group 3 = Airimport then sum chglwt(kg) then divide it from 1000 . if its correct then
you can use below formula
measure = calculate(sum([ChglWt(KG)]),Mode_group_3 = 'AirImport")
or you can use this as well if you want to divide with 1000 then use below formula
measure = calculate(divide(sum([ChglWt(KG)]),1000,0),Mode_group_3 = 'AirImport")
this will give you sum of [ChglWt(KG)] then divide it from 1000 .
- sakshikaulHelper III
This is fgiving me following error
- AnonymousNot applicable
you Need to remove extra bracket from the formula and kindly use " " excat same field from data in " " (which you want to filter).