The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have some data about store sales %. I want to compare the actual sales percentages with the targets. The targets are generated as part of forecasts and no data exists just percentages. The actuals are caluclated and I wanted to load the targets as a separate table. I have tried the following
1) Adding a table using enter data - However, when comparing on a bar chart this column aggregates and I have placed a Don't Summarise
2) Using "addcolumns" in dax I get the following error multiple columns cannot be converted to a scalar value
State | Target | Actual |
NSW | 20% | |
VIC | 50% | |
SA | 90% | |
WA | 45% | |
TAS | 55% |
Any suggestions to go about this?
Solved! Go to Solution.
Hi @Anonymous ,
First method, after creating the table, you will need to create a relationship between the fact table and new table by using [State] column.
Best Regards,
Jay
Hi @Anonymous ,
First method, after creating the table, you will need to create a relationship between the fact table and new table by using [State] column.
Best Regards,
Jay
@Anonymous , You should try like
ADDCOLUMNS(distinct(Location[State]), "Target" ,SWITCH(Location[State],
"NSW", 0.20,
"VIC", 0.50,
"SA", 0.90,
"WA", 0.45,
"TAS", 0.55))
Here the sales and target should join with the common state table and then analyze them together with help from common table
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |