Forum Discussion
Assigning a group from.
- 1 year ago
Hi Sahil5791 ,
You're almost there. Since your Assign table isn't directly related to the Calendar or Sales table, using a measure like the one below is a good approach. Here's a slightly refined version that might help with clarity and performance:
Sales by Assigned Group = VAR selectedDate = SELECTEDVALUE('Calendar'[Date]) RETURN CALCULATE( SUM('Sales'[SalesAmount]), FILTER( 'Assign', 'Assign'[StartDate] <= selectedDate && 'Assign'[EndDate] >= selectedDate ) )Make sure your visual includes the 'Group' column from the Assign table. This way, the measure will evaluate the sales amount for each group where the selected date falls between the start and end dates.
Also, if your Sales table has a group reference, you might need to adjust the logic to join that with Assign, or use TREATAS to simulate a relationship.
Let me know if you need help wiring the tables together or optimizing the model.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI
Hi @Sahil5791,
As we haven’t heard back from you, we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Vinay Pabbu
Hi @Sahil5791,
As we haven’t heard back from you, we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Vinay Pabbu