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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Dear PBI folk,
I have used I switch(true) formula and a expence mapping table to create a expence table from general ledger data.
I needed to change the data source of the expence mapping table from sharepoint excel file, to locally stored data table witch has the exact same data.
After I changed the data source to local data table everything else works, but the Excpences switch(true) measure.
Before:
After:
Expences =
VAR CurrentItem = SELECTEDVALUE('IslaiduLentele Map'[Expences Type])
RETURN
SWITCH(TRUE(),
CurrentItem = "Kitos veiklos išlaidos", [Kitos veiklos išlaidos],
CurrentItem = "Už apskaitos paslaugas", [Už apskaitos paslaugas],
CurrentItem = "Už teisines paslaugas", [Už teisines paslaugas],
CurrentItem = "Už valdymą", [Sėkmės mokestis] + [nekintamas dydis],
CurrentItem = "sėkmės mokestis", [Sėkmės mokestis],
CurrentItem = "Už gautų paskolų palūkanas", [Už gautų paskolų palūkanas],
CurrentItem = "Už depozitoriumo paslaugas", [Už depozitoriumo paslaugas],
CurrentItem = "Už auditą", [Už auditą],
CurrentItem = "Už kitas administravimo išlaidas", [Kitos veiklos išlaidos],
CurrentItem = "Nekintamas dydis", [nekintamas dydis],
CurrentItem = "Visų išlaidų suma", [Visų išlaidų suma],
CurrentItem = "Bendrųjų išlaidų suma ir koeficientas", [Bendrųjų išlaidų suma ir koeficientas],
0)
All hese measures separetly give the correct result, but m SWITCH(TRUE) measure does not provide the expected result.
Does anybody know where the probloem might be?
Solved! Go to Solution.
@Anonymous , Try if mac can make a diff
Expences =
VAR CurrentItem = MAX('IslaiduLentele Map'[Expences Type])
RETURN
SWITCH(TRUE(),
CurrentItem = "Kitos veiklos išlaidos", [Kitos veiklos išlaidos],
CurrentItem = "Už apskaitos paslaugas", [Už apskaitos paslaugas],
CurrentItem = "Už teisines paslaugas", [Už teisines paslaugas],
CurrentItem = "Už valdymą", [Sėkmės mokestis] + [nekintamas dydis],
CurrentItem = "sėkmės mokestis", [Sėkmės mokestis],
CurrentItem = "Už gautų paskolų palūkanas", [Už gautų paskolų palūkanas],
CurrentItem = "Už depozitoriumo paslaugas", [Už depozitoriumo paslaugas],
CurrentItem = "Už auditą", [Už auditą],
CurrentItem = "Už kitas administravimo išlaidas", [Kitos veiklos išlaidos],
CurrentItem = "Nekintamas dydis", [nekintamas dydis],
CurrentItem = "Visų išlaidų suma", [Visų išlaidų suma],
CurrentItem = "Bendrųjų išlaidų suma ir koeficientas", [Bendrųjų išlaidų suma ir koeficientas],
0)
@Anonymous , Try if mac can make a diff
Expences =
VAR CurrentItem = MAX('IslaiduLentele Map'[Expences Type])
RETURN
SWITCH(TRUE(),
CurrentItem = "Kitos veiklos išlaidos", [Kitos veiklos išlaidos],
CurrentItem = "Už apskaitos paslaugas", [Už apskaitos paslaugas],
CurrentItem = "Už teisines paslaugas", [Už teisines paslaugas],
CurrentItem = "Už valdymą", [Sėkmės mokestis] + [nekintamas dydis],
CurrentItem = "sėkmės mokestis", [Sėkmės mokestis],
CurrentItem = "Už gautų paskolų palūkanas", [Už gautų paskolų palūkanas],
CurrentItem = "Už depozitoriumo paslaugas", [Už depozitoriumo paslaugas],
CurrentItem = "Už auditą", [Už auditą],
CurrentItem = "Už kitas administravimo išlaidas", [Kitos veiklos išlaidos],
CurrentItem = "Nekintamas dydis", [nekintamas dydis],
CurrentItem = "Visų išlaidų suma", [Visų išlaidų suma],
CurrentItem = "Bendrųjų išlaidų suma ir koeficientas", [Bendrųjų išlaidų suma ir koeficientas],
0)
Thank you, it worked 🙂
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.