Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KGPBI
Regular Visitor

Calculate a column with multiple values

From nav i am making a report in Power BI. The nav report i want to recreate has multiplte filters for different columns. 

Salestype A = Column 1: A,B
                Column 2 100,200
                Column 3: "SupportX" or "Support Y"
Salestype B = Column 1: A,C
                       Column 2: 100,300
                       Colum3: "ERP1" or "ERP2"

Now i have created measures and that gives me the right values:

Saletype A = [Total amount]
(FILTER (Ledger entries; Ledger entries [Revenue Distribution] = "VA SUPPORT");
FILTER (General ledger entries; General ledger entries [Cost center Code] = 2,000);
FILTER (General ledger entries; General ledger entries [AggregationTF] = 1) 
Salestype B = Business apps hours = [TotalAmount]
(FILTER (Ledger entries; Ledger entries [AggregationTFBusiness apps] = 1);
FILTER (General ledger entries; General ledger entries [CostPlaceFiltering] = 1);
FILTER (Ledger entries; Ledger entries [RevenueDistributionFiltering] = 1)
)

 But to optimally use PowerBi I would like to create a (calculate)column what says me what salestype it is. In total i have arround 20 salestypes.  What is the best solution for this?



1 REPLY 1
Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1Column2
A1
B2.5

also the code you posted is not proper DAX, can you paste the code as is used in the PowerBI?

 

One option to solve this could be a dictionary table, other would be to hardocde the logic. if it's supposed to be in the calculated column then M (Power Query) may be a better option, but it's impossible to tell without knowing more about your model



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.