The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a list of transactions per machine and date, Im looking for a measure that returns the amount of machines activated filtered by date or week.
I tried this but returns the amount of times a machines was active on a day :
MACH_DAY_COUNT = CALCULATE(COUNTA(t_Batch[c_MachineId]),t_Batch[ASSIGNED_DATE])
How can I count just once per machine and date?
Thank you
Solved! Go to Solution.
I used:
MACH_COUNT = DISTINCTCOUNT(t_Batch[c_MachineId])
and works but partially, because some times we stop one machine and start another one, so when we look at the week shows we have more machines in a week than we have daily:
You should add a calendar table and set relationship with your data and then use field from your calendar table (like week, date, year , month) to get desired output.
There are lots of posts around it, and here is quick link to get started on how to create calendar table in powerbi
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.
Hello @parry2k,
I already have a date table, the issue is counting each machine once per day, even if the timeline visual is filtered by day/week or month.
if you have sugestions for the calculation I will apreciate.
Thank you
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.
May be I was not clear in my input, can you share screen shot of current graph/report and it will help to guide you.
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.
I used:
MACH_COUNT = DISTINCTCOUNT(t_Batch[c_MachineId])
and works but partially, because some times we stop one machine and start another one, so when we look at the week shows we have more machines in a week than we have daily: