Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I have some quote data that I'm trying to present as an average for each month, based on the number of 'work days' that have elapsed during the month, when the report is refreshed.
There are also multiple states and products to filter.
Here is my current attempt at a DAX formula, which isn't giving me the correct figures:
These are the relationships, between the data/ reference tables:
...and this is the ZCV_WORKDAYS ref table (each state has its own workdays):
Solved! Go to Solution.
@amitchandak I've just realised that it is working.
My reference table has 22 work days in it, when it should only have 15.
Sorry for the inconvenience!
Marc
ok - the relationship table didn't seem to post...here it is:
Try with
FILTERS (ZCV_WORKDAYS, ZCV_WORKDAYS[Date] <= LastSalesDate )
in place of KEEPFILTERS ( ZCV_WORKDAYS[Date] <= LastSalesDate )
Also why Max has been taken for workdays. Hope this is the, max no of workdays.
Can you please share what is expected and what you are getting.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Hi @amitchandak, thanks for the prompt response.
I'm currently getting the below: 261,285 (vol for Dec is 5,748,262, divided by 15 sales days = 383.217)
When I try to replace my 'keepfilters' line with your proposed line, I get the following error:
"Too many arguments were passed to the FILTERS function. The maximum argument count for the function is 1."
MAX was to try and get the latest work day.
I think I may have to start this from scratch/ rethink how I'm calculating this average...shouldn't be this hard!
Marc
@amitchandak I've just realised that it is working.
My reference table has 22 work days in it, when it should only have 15.
Sorry for the inconvenience!
Marc
User | Count |
---|---|
139 | |
113 | |
103 | |
77 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |