Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Availability of the product in the menu

Hi DAX specialists, I have a problem in a restaurant, I am researching a certain sales period, and now I would like to know over the course of, for example: 6 months, how many days a given product was on sale. Based on this availability, what is the average sale per day but in terms of the actual availability of the product (first part of my question). Sample table below I will be much obliged for your help.

 

id_wpisuTypTabIdTabDocumentRestaurantDateProductProductGroupQuantity
3936682592232155038PAR/32322Restaurant A2022-12-02Burger ClassicNAPOJE ZIMNE 1
3936682593232456038PAR/32555Restaurant A2022-12-03RedBUllNAPOJE ZIMNE 1
3936682594233723038PAR/33866Restaurant A2022-12-10Burger ClassicNAPOJE ZIMNE 1
3936682686233844038PAR/33904Restaurant A2022-12-10RedBUllNAPOJE ZIMNE 1
3936682687233895038PAR/33888Restaurant A2022-12-10Coca Cola 0,2LNAPOJE ZIMNE 1
3936682688234348038PAR/34265Restaurant A2022-12-12Coca Cola 0,2LNAPOJE ZIMNE 1
3936682689235467038PAR/35616Restaurant A2022-12-18Burger ClassicNAPOJE ZIMNE 1
3936682690235948038PAR/35989Restaurant A2022-12-19RedBUllNAPOJE ZIMNE 1
3936682691235951038PAR/35994Restaurant A2022-12-19Coca Cola 0,2LNAPOJE ZIMNE 1
5 REPLIES 5
Anonymous
Not applicable

any one?

ERD
Community Champion
Community Champion

Hi. Can you show the result you want to achieve?

If you just want to calculate days, when products were sold, per product:

days = CALCULATE(DISTINCTCOUNT(T[Date]), T[Product] = SELECTEDVALUE(T[Product]))

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Stand with Ukraine!


Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/

Thank you!

Anonymous
Not applicable

It;s not work :((( this "SELECTEDVALUE dont work in powerpivot 😞

ERD
Community Champion
Community Champion

You can use MAX instead of SELECTEDVALUE.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Stand with Ukraine!


Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/

Thank you!

Anonymous
Not applicable

still not work

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.