Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I have a measure that calculates the average expense per month per selected period.
I would like to avoid being filtered by other time slicers on the page.
My goal is to have a bar chart with the X showing expense categories, Y showing the amount and as input value:
1. the total expense for the selected period according to the slicer (here I will select a specific year and specific month)
2. My measure returning what is the average expense per month for the selected period (here I want to return the average expense per month for the select year)
I hope that I have explained myself. Currently, if I add both measures to the graph I am getting the same values because my measure is calculating the average of the selected month which ofc is the same as the total of the month.
Thank you for the help!
below the code of my measure and an image to explain my goal:
WA Monthly =
VAR AnnualAmount =
CALCULATE(
[Net Amount TOT],
ALL(
DateTable[Date])
)
VAR MonthlyTable =
ADDCOLUMNS(
SUMMARIZE(
Merged_Final,
DateTable[Year],DateTable[Month]
),
"MonthlySales",[Net Amount TOT],
"Wt",[Net Amount TOT]/AnnualAmount
)
VAR WA_Monthly =
SUMX(
MonthlyTable,
[Wt]*[MonthlySales]
)
RETURN
ABS(WA_Monthly)
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
7 |