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
mlmagl14
Helper I
Helper I

DAX to Count Sales

Hello, 

 

I have a table in which the receipt ID represents a customer, so the receipt ID can occur multiple times if the customer purchases multiple items from the store per day. It also shows the total retail of each receipt ID and the date each transaction occured. Is there a DAX formula that can calculate total amount of each unique receipt ID and to count how many of the totals are $95+ per day? 

 

I can do this in excel, but would like to know how to achieve this in power bi. First photo is an example of my excel data and the other 2 photos are what I'm essentially trying to achieve in power bi. I can do this in excel using a pivot table, but I'd like to know how to do something similar in power bi. 

 

data setdata setData set2.jpgData 3.jpg

 

1 ACCEPTED SOLUTION
darshaningale
Resolver II
Resolver II

In power query , group by Date , Receipt Id and Add aggregation for sum of total retail price.

Add another conditional column for 95+ based on the aggregated column.

 

Regards
DI

Did I answer your question? Mark my post as a solution, this will help others!
Kudos are also welcome.

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

Carlos_Pando_0-1662274888643.png

Hello I have a problem with my analysis I have to calculate the absenteeism but for this I have my table of hours generated by the collaborators and my table of dates that is like calendar.

This calendar table I have configured so that it is with fiscal year and fiscal month that always starts from October to September, when I want to relate my table dates with my table of HH (table of assistance of the collaborators), I get the erroneous data since the days worked by each collaborator despite that I do functions go wrong in the same way the hours of each collaborator even so I put a screenshot if you can support me they respond with their email to send them the project.

darshaningale
Resolver II
Resolver II

In power query , group by Date , Receipt Id and Add aggregation for sum of total retail price.

Add another conditional column for 95+ based on the aggregated column.

 

Regards
DI

Did I answer your question? Mark my post as a solution, this will help others!
Kudos are also welcome.

Hi, thanks for your reply. Am I creating a new table to group by date and reciept ID in the power query? If you dont mind, can you tell me steps on how to do this? I'm still new to power bi and I don't know how to do what you suggest. Thanks in advance

provide sample data in excel and then i can send you steps/pbix file.

I actually figured it out using your suggestions. Thank you so much for help. I really appreciate it!

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.