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.
Dear Friend and Mentors,
I am working on a report view that looks like this in Excel where I am given a set of target dollars by different managers region, code etc:
The target dollars are provided by different managers responsible for different regions. Each manager has a unique way of calculating their target dollars but they both use the same dashboard to present the group’s metric.
Currently, I am using a pivot table to group each manager’s Spend by Region and Code. The spend is already available in my query (Power Query) but there is no record of how the target dollars are calculated. Therefore, I want to make a an assumption by calculating the proportion of target dollars against each manager, region, and code so that when I create my pivot the sub-totals/grand totals would add up to the target dollars. To get around this situation, I am using a table and manually populating target dollars as they change. I would like to be able to include criteria in my Query that will automatically calculate the proportion of Target dollars and group them by Code in more detail so that it would show up in my pivot table or dashboard.
Any thoughts as for how I can approach this differently in Power Pivot, Power Query or Power BI?
Thanks for all your help in advance!
Mdrammeh
Solved! Go to Solution.
Hi @mdrammeh,
I'd like to suggest you add condition to check each total level with switch function to manual display the result.
For example:
Total Measure(Row Count) = IF(ISBLANK(MAX('Table'[Date]))=FALSE(), if(COUNT('Table'[Date])=COUNTX(ALL('Table'),[Date]), "All", if(COUNT('Table'[Date])=COUNTX(FILTER(ALL('Table'),[Date].[Year]=MAX([Date].[Year])),[Date]), "Year Level Total", if(COUNT('Table'[Date])=COUNTX(FILTER(ALL('Table'),[Date].[Year]=MAX([Date].[Year])&&[Date].[QuarterNo]=MAX([Date].[QuarterNo])),[Date]), "Quarter Level Total", if(COUNT('Table'[Date])=COUNTX(FILTER(ALL('Table'),[Date].[Year]=MAX([Date].[Year])&&[Date].[QuarterNo]=MAX([Date].[QuarterNo])&&[Date].[MonthNo]=MAX([Date].[MonthNo])),[Date]), "Month Level Total", "Day Level Total") ))))
In addition, you can try to use lastnonblank function to get the current text content.
BTW, the total function only available on original data, if your data are manual inputted, you have to manual calculate and use switch function to display them.
Regards,
Xiaoxin Sheng
Hi @mdrammeh,
I'd like to suggest you add condition to check each total level with switch function to manual display the result.
For example:
Total Measure(Row Count) = IF(ISBLANK(MAX('Table'[Date]))=FALSE(), if(COUNT('Table'[Date])=COUNTX(ALL('Table'),[Date]), "All", if(COUNT('Table'[Date])=COUNTX(FILTER(ALL('Table'),[Date].[Year]=MAX([Date].[Year])),[Date]), "Year Level Total", if(COUNT('Table'[Date])=COUNTX(FILTER(ALL('Table'),[Date].[Year]=MAX([Date].[Year])&&[Date].[QuarterNo]=MAX([Date].[QuarterNo])),[Date]), "Quarter Level Total", if(COUNT('Table'[Date])=COUNTX(FILTER(ALL('Table'),[Date].[Year]=MAX([Date].[Year])&&[Date].[QuarterNo]=MAX([Date].[QuarterNo])&&[Date].[MonthNo]=MAX([Date].[MonthNo])),[Date]), "Month Level Total", "Day Level Total") ))))
In addition, you can try to use lastnonblank function to get the current text content.
BTW, the total function only available on original data, if your data are manual inputted, you have to manual calculate and use switch function to display them.
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |