Forum Discussion
Using CALCULATE to summarize different values
- 1 year ago
1. Go to the 'Folders Summary' Table
In Power BI's Data View, select the 'Folders Summary' table from the Data pane on the right.2. Create a New Column
From the Table tools ribbon at the top, click New column.3. Enter the DAX Formula
In the formula bar, enter the following DAX expression. This formula calculates the sum for each folder in your summary table.Items =
VAR CurrentFolder = 'Folders Summary'[Folder Name]
RETURN
CALCULATE (
SUM ( 'Folders'[Items] ),
FILTER (
'Folders',
'Folders'[Folder Name] = CurrentFolder
|| STARTSWITH ( 'Folders'[Folder Name], CurrentFolder & "\" )
)
)
After you press Enter, the new Items column will be populated with the correct totals.If this explanation and solution resolve your issue, please like and accept the solution.
Hi Jeff2Jets ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.
Hi Jeff2Jets ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Thank you,
Tejaswi.