Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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).
Column1 | Column2 |
A | 1 |
B | 2.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
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |