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
asjam86
Frequent Visitor

Divide / multiply by a fixed figure

My customer has a monthly figure 300000 and it needs to be divided by a coloumn which shows how many working days are in that month. Literally

300000 / working days in a month = Daily whatevers

 

Why is this so hard to do? It's a fixed figure, it hasn't changed in 15years and to have to create a table etc just for 1 calculation of 1 figure seems a bit overkill. I've searched google high and low but it appears to me that unless it's referencable in a table PowerBi won't let you do it. Unless I'm missing something completely obvious (not unrealistic).

 

Thanks in advance.

7 REPLIES 7
parry2k
Super User
Super User

@asjam86 i didn't understood your question. it should not be very hard. can you share sample data and what you want to achieve as the final result.



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.

Literally

 

300000 / Workingdays = 

 

WorkingDays = CALCULATE(sum('date'[IfWorkDay]))

 

I can't seem to find a way to do this as it wants to reference a field. 30000 doesn't exist in a field it's a static figure.

@asjam86 assuming your workingdays formula is correct:

 

you can do this:

 

WorkingDays = 
VAR workingDays= CALCULATE(sum('date'[IfWorkDay]))
VAR fixedValue = 30000
RETURN
DIVIDE( fixedValue, WorkingDays)

 

 



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.

For some reason this is multiplying not dividing?

 

I've taken the variable: fixedvalue to 1 and it multiplies itself by the amount of working days. (Working days are showing correctly).

@asjam86 can you share the output of your result, it is very hard to figure out what is going on, and if possible provide the sample data .



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.

Cap1.PNG

 

As you can see, I have adjusted the value to 1 and I've asked it to divide 1 by the amount of working days in the month. Instead it's multiplied it? 

@asjam86 I just did the same thing and it works fine, can you share your pbix file or provide the sample data your are working on so that I can take a look



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.

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.