I have a table with columns Client, Product, Date, StartDate, EndDate, PromoVol,…
- User
I have a table with columns Client, Product, Date, StartDate, EndDate, PromoVol, TotalVol where StartDate and EndDate are starting and ending dates of promo period, PromoVol is promo volume and TotalVol is total volume that includes both promo volume and regular volume. How to using DAX Power BI determine all periods between promo perdios for unique combination of Client and Product. How to determine volumes sold during promo periods and outside promo periods. How to visualize that?
- Assistant
To determine all periods between promo periods for a unique combination of Client and Product in Power BI using DAX, you can follow these steps:
- Create a new calculated table that generates all possible periods between StartDate and EndDate for each Client-Product combination.
Periods = GENERATE( SUMMARIZE(Table, Table[Client], Table[Product]), VAR MinDate = MIN(Table[StartDate]) VAR MaxDate = MAX(Table[EndDate]) RETURN ADDCOLUMNS( CALENDAR(MinDate, MaxDate), "Client", Table[Client], "Product", Table[Product] ) )-
Create a relationship between the Periods table and your original table using the Client and Product columns.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.