Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Count status end of each month

I'm new at Power BI, so got a lot of questions - please bear with me I need a measure that will show we the count of open cases by end of each month

DCount_EndOfMonth

CALCULATE (

DISTINCTCOUNT ( P_A_ALL[item no.]);

FILTER(P_A_ALL;P_A_ALL[item status]<>"closed")

)

this obviously doesnt work, i need to add a date field as well, my question is how do i do that, the date field is created date

 

the result should be e.g. end of januar 2016 open items 60, end of  february 48, end of march 142 etc. ...

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks to @donsvensen for helping me solve this problem Here is the solution: Akk Measure 1 = CALCULATE([Measur 1];FILTER(ALL(ADATA);ADATA[Created date]<=MAX(ADATA[Created date]))) I had tried with similar, but I didnt use Measure 1, which is the measure i created to make the distinct count Thanks again

View solution in original post

6 REPLIES 6
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Suppose your data table is like below. Add two calculated columns using following formulas:

MonthName = P_A_ALL[created date].[Month]
Column = IF(P_A_ALL[item status]="close",1,0)


1.PNG

 

Then, modify your measure as :

DCount_EndOfMonth =
CALCULATE ( SUM ( P_A_ALL[Column] )ALLEXCEPT ( P_A_ALL, P_A_ALL[MonthName] ) )

 

If you have any other question, please feel free to ask.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

thank you

 

This is the result i get,

I created the 2 columns and created the measure and added to the chart as line value - unfortunatly this isnt how it should look

 

 

 

eof1.JPG

 

So in your eaxample

End of January the number of open cases should be 1, february 3+the one from January = 4  and so on

and this is what i want to show in the line value

Anonymous
Not applicable

Is it not possible to attach a pbix file ?

You can upload a file to dropbox, onedrive or another similar and share the link




Lima - Peru
Anonymous
Not applicable

I think it migh be easier to see with the file https://www.dropbox.com/s/rdin1ooef3h9twl/Support_PBIX_File.pbix?dl=0
Anonymous
Not applicable

Thanks to @donsvensen for helping me solve this problem Here is the solution: Akk Measure 1 = CALCULATE([Measur 1];FILTER(ALL(ADATA);ADATA[Created date]<=MAX(ADATA[Created date]))) I had tried with similar, but I didnt use Measure 1, which is the measure i created to make the distinct count Thanks again

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.