Forum Discussion
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
I am looking to aggreagte the total number of IDs based on the submit date -- month wise
- Anonymous3 years ago
Hi poojaghuman
You can create a new column :
Sum = SUMX(FILTER('Table',[SUBMIT DATE]<=EARLIER('Table'[SUBMIT DATE])),[ID])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.
5 Replies
- AnonymousNot applicable
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)ReturnResultCheck it out.CheersCheenuSing - poojaghumanRegular 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
- AnonymousNot applicable
Hi poojaghuman
You can create a new column :
Sum = SUMX(FILTER('Table',[SUBMIT DATE]<=EARLIER('Table'[SUBMIT DATE])),[ID])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.
- poojaghumanRegular Visitor
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
- Ashish_Mathur
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.