Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello Community,
I'm a total Power Bi newbie, and I've been asked to create a report on Custmer returns cases.
The database is tracking Receiving Date & Final Response date (closing date)
the report needs to track 3 things:
1) Number of cases created on the month. (done)
2) Number of cases closed on the month. (done)
3) number of open cases on the month.
For #3, I need to know how many cases were open in that specific period.
Example:
if a case X was created on January and closed on April, the report should count this case as open on January, February & March.
Any idea on how to crate a measure to calculate this?
Thanks in advance for your help and support!
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @cas2000
My Sample:
I build a date table by dax.
Date = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthName",FORMAT([Date],"MMMM"))
Please Try my measure.
Open Case on Month =
VAR _T1 =
GENERATE ( 'Sample', 'Date' )
VAR _T2 =
ADDCOLUMNS (
_T1,
"a",
IF (
[Date]
>= EOMONTH ( [Created], -1 ) + 1
&& [Date] <= EOMONTH ( [Closed], -1 ),
1,
0
)
)
VAR _T3 =
SUMMARIZE ( _T2, [ID], [Year], [Month], [MonthName], [a] )
VAR _Sum =
SUMX (
FILTER ( _T3, [Year] = 'Date'[Year] && [MonthName] = 'Date'[MonthName] ),
[a]
)
RETURN
_Sum
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much!!
Hi,
Share some data to work with.
Sorry for the delay, everytime I try to load the data in table format, I get an error.
Id Created Closed
1 01/02/2021 03/19/2021
2 01/09/2021 02/29/2021
3 02/05/2021 04/02/2021
4 02/19/2021 03/29/2021
#1 should be counted on Jan & Feb
#2 only Jan
#3 on Feb & Mar
#4 on Feb
Hi,
You may download my PBI file from here.
Hope this helps.
Thanks a lot for your help!!
You are welcome.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
87 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |