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
kdixon5490
Helper III
Helper III

Get Percentage by Total Amount but using the filter of Date.

Measure Help please

I have a table with the following fields

kdixon5490_2-1621618623496.png

 

From those fields I need to get the percentage total for that Quantity Sold is over 2019 Attendance.

 

So if the user select 2021-05-17 -  2021-05-20  I would need the sum of the quantitySold and the sum of the 2019 Atteandance and then do a percentage on that.

 

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @kdixon5490 ,

 

assuming that the user selects the dates using a date slicer, create this measure:

 

measure=
divide(
calculate(sum('thetablename'[Quantity Sold]))
, calculate(sum('thetablename'[2019 Attendance]))
)

 

If this does not provide what you are looking for, create a pbix file that contains sample data, but still reflects your data model. Upload the pbix to onedrive or dropbox and share the link. If you are using Excel to create the sample data, share the Excel file as well.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@kdixon5490 

@TomMartens 's measure should work, use either slicer or filter panel will automatically change the measure. Please take a try.

 

measure =
divide(
calculate(sum('Table'[Quantity Sold]))
, calculate(sum('Table'[2019 Attendance]))
)
 
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
kdixon5490
Helper III
Helper III

This did not work I'm using the filter panel to select dates.

TomMartens
Super User
Super User

Hey @kdixon5490 ,

 

assuming that the user selects the dates using a date slicer, create this measure:

 

measure=
divide(
calculate(sum('thetablename'[Quantity Sold]))
, calculate(sum('thetablename'[2019 Attendance]))
)

 

If this does not provide what you are looking for, create a pbix file that contains sample data, but still reflects your data model. Upload the pbix to onedrive or dropbox and share the link. If you are using Excel to create the sample data, share the Excel file as well.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.