Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I am trying to draw a simple bar chart in power BI with 2 values
1. price (Data type: whole number- currency)and
2. Date (Data type;date dd:mm:yyyy)
Price belongs to Table 1 and Date belongs to Table 2.
There is relation between the tables called 'product number'.
When I try to map price vs Date, is shows constant line for all the prices over the period.
It either takes sum or count and summarise the Price column. How to avoid summarise.
I have already enabled do not summarise.
Thanks.
Solved! Go to Solution.
Hi @NewbeePowerBI,
There are several things we should consider.
1. The "Cross filter direction" should be "both". Or the visual can't get a price for a special date.
2. Use date instead of date hierarchy in the axis. As we can see from the picture you posted, what would be the price for year 2014? N/A.
3. I would suggest add the "PRoduct_Nr" to the legend. I have made a little change to the sample. The price of "20140225" would be wrong if we don't add any legend.
Best Regards!
Dale
Any chance you can supply sample data that is easily copied and pasted? Is there a bridge table between the two? I'm having trouble visualizing your data and how your Product Number would be unique in one of those tables.
Sorry for the trouble. Here is the data.
This is Table A:
Product_Nr | post | Land | State | Price |
100028 | 78556 | EU | 1 | 408.25 |
100310 | 3362 | CH | 1 | 1268.70 |
Table B:
Product_Nr | State | Land | Date |
100028 | NULL | EU | 20140225 |
100028 | NULL | EU | 20140910 |
100310 | NULL | CH | 20140728 |
100310 | NULL | CH | 20150309 |
100310 | NULL | CH | 20150622 |
100310 | NULL | CH | 20151103 |
100310 | NULL | CH | 20160209 |
There is many to 1 relation between the tables(Product_Nr). This is just a sample of data. Actual table contains more than 20000 rows of data.
Hi @NewbeePowerBI,
There are several things we should consider.
1. The "Cross filter direction" should be "both". Or the visual can't get a price for a special date.
2. Use date instead of date hierarchy in the axis. As we can see from the picture you posted, what would be the price for year 2014? N/A.
3. I would suggest add the "PRoduct_Nr" to the legend. I have made a little change to the sample. The price of "20140225" would be wrong if we don't add any legend.
Best Regards!
Dale
Hi @v-jiascu-msft Thanks for your detailed reply. I changed the cross filter direction and the problem is solved! I can now map years vs price.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |