Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have the following tables.
Participants - All participants provides participant detail
DateTable - Date table.
Revenue - details all transactions by transactions date made by a participant (looks up to Participant and Date Table)
Enforcement Actions- logs by date when an Enforcemennt activity is carried out (looks up to Participant and Date Table)
What I am trying to achieve is I was know how much revenue was collected from Participants the activity was carried out on within 30 days of enfocement Activity carried out. I have a Date Slicer using the Date table to select the dates i'm interested in. Such as From 05/09/2020 - 08/09/2020
This is the measure I've used :
Enforcement Action Collections 30Days = CALCULATE([Total Revenue Collected],FILTER(Participants,CONTAINS(EnforcementActions,EnforcementActions[participant_ID],Participants[Participant_ID])),DATESINPERIOD(DateTable[Date].[Date],MIN(EnforcementActions[Action_Activity_Date]),+30,DAY))
More than one enforcement activity can be carried out on a participant in the same period? I'm not sure if this is causing any issues?
Can anyone please help me as this is not returning the right results? Would be much appreciated.
Solved! Go to Solution.
@mishb77 , try like
Enforcement Action Collections 30Days =
var _min = minx(allselected(DateTable),DateTable[Date])
return
CALCULATE([Total Revenue Collected],FILTER(Participants,CONTAINS(EnforcementActions,EnforcementActions[participant_ID],Participants[Participant_ID])),DATESINPERIOD(DateTable[Date],_min,+30,DAY))
Just to update. Your calculation worked. I had my REvenue Collections table linked up to Date table by enfocement date rather than transation date.
@mishb77 , try like
Enforcement Action Collections 30Days =
var _min = minx(allselected(DateTable),DateTable[Date])
return
CALCULATE([Total Revenue Collected],FILTER(Participants,CONTAINS(EnforcementActions,EnforcementActions[participant_ID],Participants[Participant_ID])),DATESINPERIOD(DateTable[Date],_min,+30,DAY))
Thank you for your response. I tried that but it still returned transactions in November when the dates I had selected where March.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
61 | |
58 |
User | Count |
---|---|
194 | |
111 | |
105 | |
79 | |
71 |