Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have table (quotes) which has quotestatus column,createdon date column, closedon date column,quotereference column and a club year coulmn.
Club year logic is: Club Year = IF(DATE(quotes[createdon].[Year],2,20)>quotes[createdon].[Date],quotes[createdon].[Year]-1,quotes[createdon].[Year])
Club year starts from 20th February of a particular year to 20th of Feb next year.Club year is created using created on column.
Now let's move to the main requirement:
I want to count the distinct quotereference number based on quotestatus but created date and closed on should fall under same club year.
If createdon date and closedon date falls in two different club year then the distinct count of the quote will be in the club year which contains the closed date.
Please refer the screenshot for better understanding:
As you can see in the above screenshot that createdon date and closedon date date falls in two different club years, so these quotes will be counted in 2019 club year because closed on date falls under 2019 club year.
Please find below the screenshot of entire table.
Solved! Go to Solution.
Hi,
Would you please show us your expected output more clearly?
measure =
CALCULATE (
COUNT ( quotes[quotereference] ),
FILTER (
SUMMARIZE (
quotes,
quotes[quotereference],
quotes[closedon],
quotes[Club Year],
quotes[closedon],
quotes[quotestatus],
"cYear", IF (
DATE ( quotes[createdon].[Year], 2, 20 ) > quotes[closedon],
quotes[closedon].[Year] - 1,
quotes[closedon].[Year]
)
),
[cYear] = quotes[Club Year]
&& quotes[quotestatus] = "Declined"
)
)
You can create measure like the measure above. It will be nice, if you can inform us more detailed information( your data(by OneDrive for Business)) if possible for test? Then we will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Dedmon Dai
Hi,
Would you please show us your expected output more clearly?
measure =
CALCULATE (
COUNT ( quotes[quotereference] ),
FILTER (
SUMMARIZE (
quotes,
quotes[quotereference],
quotes[closedon],
quotes[Club Year],
quotes[closedon],
quotes[quotestatus],
"cYear", IF (
DATE ( quotes[createdon].[Year], 2, 20 ) > quotes[closedon],
quotes[closedon].[Year] - 1,
quotes[closedon].[Year]
)
),
[cYear] = quotes[Club Year]
&& quotes[quotestatus] = "Declined"
)
)
You can create measure like the measure above. It will be nice, if you can inform us more detailed information( your data(by OneDrive for Business)) if possible for test? Then we will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Dedmon Dai
@a4 , refer if this article can help
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |