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
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
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.