The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How can I create a DAX measure to display the count of approved orders by month?
Table: Purchasing Location
Date Table:
Unrelated slicer date table: 'Date_Workflow Approvals'
I think i'm close with the following:
- but when i put on the chart filter for PO Activity type = "EME" (for drill through to data), it breaks the lines
Approval EME Count YTD =
VAR EndMonth =
MAX ( 'Date_Workflow Approvals'[Date] )
VAR StartMonth =
EOMONTH ( EndMonth, -12 )
VAR SelectedMonth =
MAX ( 'Workflow - All Approvals'[Month] )
RETURN
IF (
SelectedMonth >= StartMonth
&& SelectedMonth <= EndMonth,
CALCULATE (
COUNT ( 'Workflow - All Approvals'[Order Number] ),
'Workflow - All Approvals'[Decision Code] = "Approve",
'Workflow - All Approvals'[PO Activity Type] = "EME",
'Workflow - All Approvals'[Month] >= StartMonth
&& 'Workflow - All Approvals'[Month] <= SelectedMonth
) + IF(ISBLANK(SelectedMonth) && NOT ISBLANK(StartMonth), 0, 0),
BLANK ()
)
I've spent hours going in circles with ChatGPT but getting nowhere..
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
21 | |
14 | |
14 | |
9 | |
7 |