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
Anonymous
Not applicable

summing by date and ID how to

CALCULATE(SUM(LNApps_Facts[Application_Count]), DATESBETWEEN(LNApps_AppDateDim[ActualDate], 
DATE(2017,8,1), 
DATE(2017,8,31) 
))

I am trying to make a formula for summing up the number of applications between two dates. What I would also like to do is sum by an ID that is not in the formula above. How can I modify the formula to include a generic filter by id?

 

Thanks in advance 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Anonymous,

Do you want to get sum value of each ID? If so, you can create a table visual using the ID field and the measure. Or you can create a card visual using the measure, then use the ID slicer to filter the card visual.
1.JPG3.JPG2.JPG

However, if you want to get sum value of a specific ID, create the measure using DAX below.

Measure = CALCULATE(SUM(LNApps_Facts[Application_Count]),DATESBETWEEN(LNApps_AppDateDim[Date],DATE(2017,8,1),DATE(2017,8,30)),FILTER(LNApps_Facts,LNApps_Facts[ID]="ID value"))

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@Anonymous,

Do you want to get sum value of each ID? If so, you can create a table visual using the ID field and the measure. Or you can create a card visual using the measure, then use the ID slicer to filter the card visual.
1.JPG3.JPG2.JPG

However, if you want to get sum value of a specific ID, create the measure using DAX below.

Measure = CALCULATE(SUM(LNApps_Facts[Application_Count]),DATESBETWEEN(LNApps_AppDateDim[Date],DATE(2017,8,1),DATE(2017,8,30)),FILTER(LNApps_Facts,LNApps_Facts[ID]="ID value"))

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Still looking for help on this

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.