cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kh0050
Frequent Visitor

Count Statement in Power BI - Urgent

Hi All

Please help me to write the below statement in Power BI?

 

CASE WHEN `TableA`='-' THEN 0 ELSE CONCAT(`TableA`,'0') END

 

Many Thanks

 

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @kh0050 ,

 

If you need a calculated column ,use below dax expression:(based on my sample table)

Column = IF('Table'[A]="-","0",'Table'[A]&0)

If you need a measure,use below dax expression:

Measure = IF(MAX('Table'[A])="-",0,MAX('Table'[A])&0)

For both method,you would see:

v-kelly-msft_2-1621242058127.png

 

For my sample .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

View solution in original post

2 REPLIES 2
kh0050
Frequent Visitor

Thank you so much Kelly!

v-kelly-msft
Community Support
Community Support

Hi @kh0050 ,

 

If you need a calculated column ,use below dax expression:(based on my sample table)

Column = IF('Table'[A]="-","0",'Table'[A]&0)

If you need a measure,use below dax expression:

Measure = IF(MAX('Table'[A])="-",0,MAX('Table'[A])&0)

For both method,you would see:

v-kelly-msft_2-1621242058127.png

 

For my sample .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

View solution in original post

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors