Forum Discussion
user2023
3 years agoRegular Visitor
Transform SQL to DAX
I'm new to Powerbi, and I'm having trouble converting this SQL code to DAX measure: perc_ating { label: "∆ % Monthly Goal" type: number sql: case when ${perc_ating_aux} >= 0 then ${perc_ating_au...
Greg_Deckler
3 years agoCommunity Champion
user2023 This would be easier with sample data and expected output but maybe try:
perc_ating measure = IF( [perc_ating_aux] >= 0, [perc_ating_aux], 100)- user20233 years agoRegular Visitor
Greg_Deckler But how would I put the value format "#.0\%" for it to come within this condition?
- R1k913 years agoSuper User
couldn't you simply use format pane for that measure?
- Greg_Deckler3 years agoCommunity Champion
user2023 Either R1k91 's method or you can use a Custom Format String. Use custom format strings in Power BI Desktop - Power BI | Microsoft Learn. You could use FORMAT but that will turn it into text.