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
mdaamirkhan
Post Prodigy
Post Prodigy

How to display number and percent both both in row in table

Hi All,

 

I need help on below table I want replicate this in power bi but how.  How to display this  below table in power  bi number and percent both in one table in rows. 

 

If you can help me it will be greate . if you can share the pbix file how its done what will be logic

 

How to display this table in power number and  percent both  in  one table in rowsHow to display this table in power number and percent both in one table in rows

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

 

 

 

speedramps_0-1658775271731.png

 

Create a measure for each value like this 

Product = DISTINTCOUNT(Facts[product])

[Staff Salary] = SUM(Facts[salary])
[Sales%] = DIVIDE( SUM(Facts[sales], [Total sales])

 

Then create table calledDriver like this

ID, Type
1,"Product"
2,"% Product"
3,"Product 2"
4,"% Product 2"

5,"Staff Salary"
6,"Sales %"

 

Sort the Type by ID

 

Then create a measure like this

KPIS =
SWITCH(SELECTEDVALUE(Driver[Type]),

"Product",[Product],
"% Product"",[Product%],
3,"Product 2",[Product2],
4,"% Product 2",[Product2%],

5,"Staff Salary",[Staff Salary],
6,"Sales %",[Sales%],
)

 

Drag table visual to your report canvas with

Driver[Type] and KPIS 

 

You will then nees to Format command the %.

See https://docs.microsoft.com/en-us/dax/format-function-dax

 

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills, not do users job for them !

So plaase click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

 

 

View solution in original post

1 REPLY 1
speedramps
Super User
Super User

 

 

 

speedramps_0-1658775271731.png

 

Create a measure for each value like this 

Product = DISTINTCOUNT(Facts[product])

[Staff Salary] = SUM(Facts[salary])
[Sales%] = DIVIDE( SUM(Facts[sales], [Total sales])

 

Then create table calledDriver like this

ID, Type
1,"Product"
2,"% Product"
3,"Product 2"
4,"% Product 2"

5,"Staff Salary"
6,"Sales %"

 

Sort the Type by ID

 

Then create a measure like this

KPIS =
SWITCH(SELECTEDVALUE(Driver[Type]),

"Product",[Product],
"% Product"",[Product%],
3,"Product 2",[Product2],
4,"% Product 2",[Product2%],

5,"Staff Salary",[Staff Salary],
6,"Sales %",[Sales%],
)

 

Drag table visual to your report canvas with

Driver[Type] and KPIS 

 

You will then nees to Format command the %.

See https://docs.microsoft.com/en-us/dax/format-function-dax

 

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers and here to coach you with Power BI and DAX skills, not do users job for them !

So plaase click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

 

 

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.