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

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.

Reply
NewbeePowerBI
Advocate I
Advocate I

Visual in Power BI showing constant line- Data gets summarised

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.

Capture.PNG

 

 

 

 

1 ACCEPTED 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. Visual in Power BI showing constant line- Data gets summarised1.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.Visual in Power BI showing constant line- Data gets summarised2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Sorry for the trouble. Here is the data.

 

This is Table A:

Product_NrpostLandStatePrice
10002878556EU1408.25 
1003103362CH11268.70

 

Table B:

Product_NrStateLandDate
100028NULLEU20140225
100028NULLEU20140910
100310NULLCH20140728
100310NULLCH20150309
100310NULLCH20150622
100310NULLCH20151103
100310NULLCH20160209

 

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. Visual in Power BI showing constant line- Data gets summarised1.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.Visual in Power BI showing constant line- Data gets summarised2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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