Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
Can someone help me with calc. for RunningSum (Duration) based on the Rank. Below is the table data. TIA, cheers.
Rank and Duration are calc. measures.
Solved! Go to Solution.
Hi,
Try this measure
=SUMX(TOPN([Rank],CALCULATETABLE(VALUES(Data[Name]),ALL(Data[Name])),[Rank],1),[Duration (mins) - ALL])
Hi @kumsha1 ,
Please try the measure like following screenshot.
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Both measures worked for my requirement, thanks @Ashish_Mathur and @v-zhenbw-msft
=SUMX(TOPN([Rank],CALCULATETABLE(VALUES(Data[Name]),ALL(Data[Name])),[Rank],1),[Duration (mins) - ALL])
You are welcome.
Hi @kumsha1 ,
Please try the measure like following screenshot.
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Thanks @amitchandak for quick reply.
Tried the formula in cal. column/measure has returned same values as Duration.
calculate(sum(table[duration]), filter(table, table[Rank]<=max(table[Rank]))) in a cal.column returned circular dependency error.
Hi,
Try this measure
=SUMX(TOPN([Rank],CALCULATETABLE(VALUES(Data[Name]),ALL(Data[Name])),[Duration (mins) - ALL],1),[Duration (mins) - ALL])
Hi @Ashish_Mathur , measure almost worked, thanks !
how do i get the values in correct direction. Sorting on Rank didn't help.
Hi,
Try this revised measure
=SUMX(TOPN([Rank],CALCULATETABLE(VALUES(Data[Name]),ALL(Data[Name])),[Duration (mins) - ALL]),[Duration (mins) - ALL])
If it does not work, then share the link from where i can download your PBI file.
@Ashish_Mathur , i have below values now.
Sorry mate, .pbix can't be shared due to security reasons, it has all other Org stuff.
Hi,
Try this measure
=SUMX(TOPN([Rank],CALCULATETABLE(VALUES(Data[Name]),ALL(Data[Name])),[Rank],1),[Duration (mins) - ALL])
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
102 | |
68 | |
45 | |
37 | |
37 |