To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
I have below sample data table that i'd like to import to powerbi. When i import i'd like to format, "Gross","Net","Volume" as a whole number, "GP %" and "Contribution" as percentage.
Can anyone have a solve for this problem?
Gross | 2000 |
Net | 3000 |
Volume | 1500 |
GP % | 20% |
Contribution | 15% |
Solved! Go to Solution.
@dokat One method would be to use a Calculation Group. Another method would be to use FORMAT. Still another method would be to pivot your first column in Power Query using your second column as the value and then you can set the data types correctly for each column (preferred).
Measure =
SWITCH(MAX([Attribute]),
"GP %",FORMAT(MAX([Value]),"Percent"),
"Contribution",FORMAT(MAX([Value]),"Percent")
[Value] & ""
)
@dokat One method would be to use a Calculation Group. Another method would be to use FORMAT. Still another method would be to pivot your first column in Power Query using your second column as the value and then you can set the data types correctly for each column (preferred).
Measure =
SWITCH(MAX([Attribute]),
"GP %",FORMAT(MAX([Value]),"Percent"),
"Contribution",FORMAT(MAX([Value]),"Percent")
[Value] & ""
)