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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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