Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Glitch with Conditional columns

I have a problem with the data type of a conditional colum.
I have a whole Number column I am modifying to group values together, but the output is being treated as text and not a whole number. I can not then change the type to whole number, as I get the demand to convert it to Import Mode, which I want to avoid. It did accept decimal number, which looks fine in the query, but as soon as I drag it to the X axis, they all display with .00 at the end, which I don't want. So now I am going to have to build an index table and a relationship to get them in the right order, so the question is why can't I do a direct query and have the contional column output whole numbers??

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You need to create a measure to change your value,using  fixed(value,number),number here equals the number of decimal places.

As you see below:

Annotation 2020-02-27 101514.png

 

If you choose "0",it will convert into a int like number.But it's text type.

 

Here is the reference.

 
Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!

 

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous , is your issue resolved

Anonymous
Not applicable

It is worked around with a index table to get the text into the right order. I was still hoping someone official may comment on it...

Hi @Anonymous ,

 

Does @amitchandak 's suggestion work?

 

Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

It does not work for me, as the Data view does not show DirectQuery tables. 

Hi @Anonymous ,

 

You need to create a measure to change your value,using  fixed(value,number),number here equals the number of decimal places.

As you see below:

Annotation 2020-02-27 101514.png

 

If you choose "0",it will convert into a int like number.But it's text type.

 

Here is the reference.

 
Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!

 

amitchandak
Super User
Super User

Have you tried reducing the no of decimal place to 0, in number formatting?

 

Data Format.png

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.