Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I'm stuck since 2 hours on something very basic and I really have no idea on how to do.
I have 8000 transactions like this and I need to calculate the "Amount Of Days that have transactions" that I would put in this table (in the blue) to have it for each products.
I was at first thinking to use Count and Distinctcount to find the solution but it wasn't the results expected. I'm maybe missing something very easy, but I currently don't see it...
Do you have a tips on how I could do please?
(Picture of the final results expected)
Thank you very much !!
Henri Dethoor
Solved! Go to Solution.
Hi @Anonymous
I got the solution for you problem. You can drag date column from receipt table. I have attached screenshot below for your reference.
Please mark this as solution if it works.
Hi @Anonymous
I got the solution for you problem. You can drag date column from receipt table. I have attached screenshot below for your reference.
Please mark this as solution if it works.
Thank you, I feel very stupid, I think I focused too much on "Day" and not the full date. I'll try to understand why I did this mistake now !
Thank you!!!
Hello! I've already tried this possibilty and as you can see in the screenshot I just get 31 everywhere. While my results should be: 87,85,88... Thank you for trying
Hello, thank you for your answers! I tried to look for my DAX code but I didn't find how I should do (I'll make some research for my next topics about how I need to do). For the moment you can find my data in this link. You don't need to mind about all of them: Only the page "Task 2PTS" and "Tooltip3" + the tables Blaknes / Employee / Products / Receipt can be used.
I tried your solution with Countx but it didn't made the solution I expected sorry. I tried with different values also!
Thank you everyone.
Hi @Anonymous
you can use countx funtion to calculate the number of days as mentioned below.
=countx(values(product),count(product))
you can share the pbix file or you dax formula if this not helps.
Please mark this as solution if this helps you.
@Anonymous Hi. Could share your DAX code?
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
49 | |
46 |