Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi
I wonder if this Measure can be optimized a bit? I works as intended, but is a bit slow
Seneste betalingsmetode =
VAR SenestBetalt = CALCULATE(
MAX(FactBetalingslinjer[DatoKeyStoettePeriode]),
FactBetalingslinjer[#Payed Amount (GL)] > 0
)
VAR BetaltMetode = CALCULATE(
MAX(FactBetalingslinjer[BetalingsmetodeKey]),
FactBetalingslinjer[DatoKeyStoettePeriode] = SenestBetalt
)
VAR Metode = CALCULATE(
MAX(DimBetalingsmetode[BetalingsmetodeNavn]),
DimBetalingsmetode[BetalingsmetodeKey] = BetaltMetode
)
RETURN
Metode
I need to find the latest period based on latest payment (Variable SenestBetalt)
Then from that date I like to find the payment type (Variable BetaltMetode)
Finally I get the paymeny name from the dimension (Variable Metode)
The final part is needed (I think) because it's a starschema with all dimensions pointing at FactBetalingslinjer, so I can find the key and then get the name from the dimension.
But can it be done smarter? and can it be done faster.
Thanks in advance 🙂
Hi @Bokazoit I do not understand you table name except that Fact* your fact table. If so, use ADD( SUMMARIZE pattern as variable and after that filter results.
Proud to be a Super User!
Hi @Bokazoit I do not understand you table name except that Fact* your fact table. If so, use ADD( SUMMARIZE pattern as variable and after that filter results.
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 6 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |