Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need some help in creating SWITCH funtion which is nothing but CASE statement in POWERBI.
SWITCH funtion has used to calculate final output based on conditions and values will be come from different tables.
Source:
Name (Table0)
USA, UK , Canada
Values1:
Table 1:
Score1Measure: 4000 for USA
Values2:
Table 2:
Score2Measure: 1 for UK
Values3:
Table 3:
Score3Measure: 0 for CANADA
After applying Switch funtion like below;
it gave me wrong output as shown in table below. USA should have 3000. It does look like automatically average out but i checked data type and summary which is SUM. Not sure what could be wrong here. Any advise would be appreciated!
OUTPUT :
Table:
Name Score
USA 3000
UK 1
Canada 0
There are total 3 Tables in data PowerBI data model;
1) Fact_Incident
2) Delivery
3) Customer Experience
These are the following data and columns in each table
Fact_Incident Table:
TAT Time --> (Column Name)
1
Delivery Table:
No of Enhance No. of sustain -->(Column Name)
3000 445
Custom Table: (This is out put table where Score is empty)
Name Score -->(Column Name)
USA
UK
Canada
After SWITCH or any CASE function i would like to see table as below;
Custom Table: (Fianl Output)
Name Score -->(Column Name)
Enhance 3000
Sustain 445
TAT 1
Hope this will give you more detail.
NOTE: There is no relationship between source table and output table this is just case statement i would like to use here and put whatever value is there in source.
Thanks
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
67 | |
57 | |
54 | |
36 | |
34 |
User | Count |
---|---|
84 | |
71 | |
55 | |
45 | |
43 |