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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
poojaghuman
Regular Visitor

Need help in aggregating values in report using power BI

 

I am new to using power BI and need support with the following , I have my data in the following format 

 

poojaghuman_1-1671187204028.png

 

 

I am looking to aggreagte the total number of IDs based on the submit date -- month wise

 

poojaghuman_0-1671187173323.png

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @poojaghuman 

You can create a new column :

 

Sum = SUMX(FILTER('Table',[SUBMIT DATE]<=EARLIER('Table'[SUBMIT DATE])),[ID])

 

vxinruzhumsft_0-1672195497165.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number.  Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table.  To your visual, drag Year and Month name from the Calendar Table.  Write these measures:

ID count = distinctcount(Data[ID])

ID count YTD = calculate([id count],datesytd(calendar[date],"31/12"))

ID count since inception =  calculate([id count],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-xinruzhu-msft
Community Support
Community Support

Hi @poojaghuman 

You can create a new column :

 

Sum = SUMX(FILTER('Table',[SUBMIT DATE]<=EARLIER('Table'[SUBMIT DATE])),[ID])

 

vxinruzhumsft_0-1672195497165.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello 

 

thanks for your response, this didnt help as it calculated the SUM of the values in the ID column

What i needed was the total number of IDs created prior each date 

poojaghuman
Regular Visitor

Thank you for the response, Apologies for the delay in responding back

I did try this one 

I get same value for all dates .. what i need is the total ID count for each date -- "Total IDs created until that date"

 

I need 

CheenuSing
Community Champion
Community Champion

Hi @poojaghuman ,

 

Assume the table name is 'Ids Received' with columns , ID, Submitted Date

You can then write a measure

RunningTotal Received =
var _selDate = SELECTEDVALUE('Ids Received'[Submitted Date])
var Result = CALCULATE(COUNTROWS('Ids Received'), 'Ids Received'[Submitted Date] <= _selDate)
Return
Result
 
Check it out.
 
Cheers
CheenuSing
Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors