The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have a very simple table containing 3 columns:
- Locatie
- Date
- Waarde (value)
I created a measure:
Solved! Go to Solution.
Not sure but worth a try
#waarde =
SUMX (
SUMMARIZE (
'table 1',
'table 1'[Locatie],
'table 1'[datum].MONTH,
"naam", AVERAGE ( 'table 1'[Waarde] )
),
[naam]
)
It sort of works in this model 🙂 I have to divide the total by the amount of months (12 in this case) and then I get the expected result. all the other values are then incorrect, but i don't need them in this case.
I tried to do this in a datamodel with a seperate date table, but then I do not get the wanted result. I tink its because of filters. I tried to exclude them with All/Allexpect but I cannot get the right amount.
This table 1 is not connected directly to the date table, but it is via another related table.
Is sumx with summarize the correct way to calculate this? I also tried the groupby function and get the same results.
Please share a screenshot of the data model with the relationships
Hi @tamerj1
Sorry for the late reply.
I looked at the datamodel and saw that I made a mistake in the model. I changed the model and the formula (without 'table 1'[datum].MONTH,) is working correct.
Not sure but worth a try
#waarde =
SUMX (
SUMMARIZE (
'table 1',
'table 1'[Locatie],
'table 1'[datum].MONTH,
"naam", AVERAGE ( 'table 1'[Waarde] )
),
[naam]
)
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |