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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Markzolotoy
Impactful Individual
Impactful Individual

Division in Model

I have created a new measure like this:

ArchiveTotal = SUMX(Summaries, Summaries[FreeAmount] + Summaries[UsedAmount])
 
Now I want to calc the percentage of FreeAmount and UsedAmount over ArchiveTotal.
All I am trying is: FreeAmount / ArchiveTotal * 100. But when I specify DIVIDE function for new measure all I get is ArchiveTotal, two two other columns are not even available. What am I doing wrong?
 
Thanks
2 ACCEPTED SOLUTIONS
AlB
Super User
Super User

@Markzolotoy

Using your existing measure [ArchiveTotal]:

NewMeasure =
VAR usedAmount_ = SUM(Summaries[UsedAmount])
RETURN
DIVIDE(usedAmount_, [ArchiveTotal])

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

v-xinruzhu-msft
Community Support
Community Support

Hi @Markzolotoy ,

Column names alone cannot be displayed in the measure, you need to bring the column names into the formula, you can try the following code:

_ FreeAmount=divide(sum(Summaries[FreeAmount]),[ArchiveTotal])

_ UsedAmount=divide(sum(Summaries[UsedAmount]),[ArchiveTotal])

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xinruzhu-msft
Community Support
Community Support

Hi @Markzolotoy ,

Column names alone cannot be displayed in the measure, you need to bring the column names into the formula, you can try the following code:

_ FreeAmount=divide(sum(Summaries[FreeAmount]),[ArchiveTotal])

_ UsedAmount=divide(sum(Summaries[UsedAmount]),[ArchiveTotal])

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlB
Super User
Super User

@Markzolotoy

Using your existing measure [ArchiveTotal]:

NewMeasure =
VAR usedAmount_ = SUM(Summaries[UsedAmount])
RETURN
DIVIDE(usedAmount_, [ArchiveTotal])

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Markzolotoy
Impactful Individual
Impactful Individual

@AlB Here is my table:

Markzolotoy_0-1671889224335.png

I want to create a new measure = UsedAmount * 100 / ArchiveTotal

where ArchiveTotal = 

ArchiveTotal = SUMX(Summaries, Summaries[FreeAmount] + Summaries[UsedAmount])
 
When I use DIVIDE function intellisense shows ArchiveTotal, but not other numeric columns.

 

AlB
Super User
Super User

Hi @Markzolotoy 

What do you mean by "two other columns are not even available"

Can you show the exact code you are using to calculate the percentages? And the result you are getting vs the desired one?

Showing a sample of the table(s) would also help

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors