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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Get different datatypes in single numeric column

Hi Team ,

 

I am struggling with the below requirement . I have a column names called Process and Values . In values column I need both Decimal /Whole number and Percentage as shown below .Below is the excel source file , when I get the same into Power Bi desktop, The values are converting to decimals and not able to change the data types as in below image. So, Please help on this as it is the urgent requirement that I stucked in it .Need both Whole Number and Percentage in a single column called Values with respect to Process .

chandru123_0-1610040680710.png

 

9 REPLIES 9
parry2k
Super User
Super User

@Anonymous for your measure, wrap your filter condition in KEEPFILTERS

 

Measure % = CALCULATE ( SUM ( Table[Amount] ), KEEPFILTERS ( Table[Type] = "ABC" ) )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous probably measure were created then format was applied to the measure, it is not data type change but it is a formatting

 

Amount = CALCULATE ( SUM ( Table[Amount] ), Table[Type] = "Sales" )

Rate % = CALCULATE ( SUM ( Table[Amounnt] ), Table[Type] = "Rate" )

 

in the above two measure, the sum is used from the same amount column and filtered on some condition and now for above measure I can give different display format, one can be currency and other can be %

 

I hope it helps.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

HI Parry ,

It seems it works out but I am getting the values for all process fields but we need it only for Efficiency % in example and also the sign % should be beside it.

chandru123_0-1610042716926.png

 

Anonymous
Not applicable

chandru123_1-1610042879862.png

chandru123_3-1610042890651.png

All the values has group by for all the process records but that value should be for Efficeincy % in the example

parry2k
Super User
Super User

@Anonymous it is not possible to have the same data type in a single column except if you use calculation groups and add the logic there for format string otherwise it is not possible.

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

But if we see the below it happened .May I know how is it possible . Becauese here Unit Reviewed and Utilization% belons to process column and values column consists of marked values 207 and 87 % . 

chandru123_0-1610041450867.png

 

What @parry2k @and I said...those are most likely measures with the formatting applied to the measure, not the fields themselves.

littlemojopuppy
Community Champion
Community Champion

If I'm understanding you correctly, you want multiple data types for a single field?  That isn't possible...fields always have a defined data type.  If your need is based on output requirements, you can create measures for calculations and format those measures as decimal, percentage or whole number as necessary.

Anonymous
Not applicable

The output I Need in table visual like below

But if we see the below it happened .May I know how is it possible . Becauese here Unit Reviewed and Utilization% belons to process column and values column consists of marked values 207 and 87 % . 

chandru123_0-1610041450867.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.