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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
YcnanPowerBI
Helper II
Helper II

Divide based on measures

Hello everyone,

 

I am facing an issue when trying to divide by two measures.  Here are my measures being used, current and expected outcome as well as sample data.  It appears to only be diving by any account that has "1 Week" tickets v all, but haven't been successful when I change any of the DAX below.   Any help, greatly appreciated.

 

1 Disctinct Accounts = DISTINCTCOUNT(Merge1[Account Number & Name])
1 Sum of Tickets Week 1 = CALCULATE(sum(Merge1[Ticket Details.Tickets]),Merge1[Weeks for Tickets Created] = "1 Week")
1 Tickets per Install = DIVIDE([1 Sum of Tickets Week 1],Merge1[1 Disctinct Accounts])
 
CURRENT V EXPECTED RESULTS
 FebruaryMarchApril
Distinct Accounts211
1 Sum of Tickets Week 1852
1 Tickets per Install - Current852
1 Tickets per Install - Expected452
 
 
SAMPLE DATA
 
Account Number & NameTicket Details.TicketsWeeks for Tickets CreatedProject Complete
111 WeekApril
111 WeekApril
112 WeeksApril
211 WeekMarch
211 WeekMarch
222 WeeksMarch
212 WeeksMarch
211 WeekMarch
211 WeekMarch
211 WeekMarch
212 WeeksMarch
212 WeeksMarch
212 WeeksMarch
212 WeeksMarch
213 WeeksMarch
312 WeeksFebruary
312 WeeksFebruary
311 WeekFebruary
321 WeekFebruary
312 WeeksFebruary
311 WeekFebruary
311 WeekFebruary
311 WeekFebruary
311 WeekFebruary
311 WeekFebruary
312 WeeksFebruary
312 WeeksFebruary
312 WeeksFebruary
312 WeeksFebruary
312 WeeksFebruary
312 WeeksFebruary
412 WeeksFebruary
412 WeeksFebruary
413 WeeksFebruary
 
 
1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @YcnanPowerBI 

 

I've created a file with the data you posted above and I do not have the issue.  It works as you expect - please check my file to see what is different to yours.

 

Download example PBIX file

 

dataaa.png

 

Also, are you using dates and/or a date table or are the month names text?  You should use proper dates.

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @YcnanPowerBI 

 

I've created a file with the data you posted above and I do not have the issue.  It works as you expect - please check my file to see what is different to yours.

 

Download example PBIX file

 

dataaa.png

 

Also, are you using dates and/or a date table or are the month names text?  You should use proper dates.

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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