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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Pacotille
Regular Visitor

Legend problem on cumulative bar chart

hey everyone,

 

I'm encountering an issue on a cumulative bar chart i'im trying to make.

I have to represent tonnage cumulation by chemical classes (0-1, 1.1-1.2 ....) and i've already made those.

I calculated a measure to plot tonnage which is :

 

Cumulalt = CALCULATE( SUM(Table[Tons]),

 FILTER( ALL(Table), MIN(Table[Classes]) <= Table[Classes])

                )

 

When i'm plotting it, it looks like this :

Pacotille_0-1682477733425.png

 

This is alright, but when i decide to add a legend, here it's a product classification which each line in my date source have, it goes like this :

Pacotille_1-1682477733426.png

 

The problem is that legend doesn't seem to discriminate my different products, it just stack 3 times the same value (~15M max x 3).

Any one have an idea ? thanks in advance !

 

4 REPLIES 4

I am facing same problem, Please let me know if you are able to resolve it

Pacotille
Regular Visitor

Well for the data set, each line represent 1 volume entity with a lot of attributes. Here what's useful for my visual are those attributes :

  • [Classif] : it contains1 of those 3 values : 1/2/3. This one will have to be use to apply a legend on the stacked bar chart
  • [Tons] : it contains the mass of the sample, it can have random values
  • [Analyse] : it contains the value of the element analysed in this sample, it have a a value range [0.00 - 6.00]
  • [Classes] : Classification made with [Analyse], it goes 0.1 on 0.1.

I can't put here a sample data because my csv contain ~1M lines and a random sample won't be representative.

Currently the problem can be see with a matrix display :

Classes123
114498307.514498307.514498307.5
1.114319542.514319542.514319542.5
1.213947776.2513947776.2513947776.3
1.313774018.7513774018.7513774018.8
1.413209607.513209607.513209607.5
1.512365866.2512365866.2512365866.3
1.610787102.510787102.510787102.5
1.78924576.258924576.258924576.25
1.87304201.257304201.257304201.25
1.9566688056668805666880
24139023.754139023.754139023.75
2.12978871.252978871.252978871.25
2.22107673.752107673.752107673.75
2.31608771.251608771.251608771.25
2.41158721.251158721.251158721.25
2.5745191.25745191.25745191.25
2.6517865517865517865
2.7370542.5370542.5370542.5
2.8218385218385 
2.9120915120915120915
38752587525 

 

My cumulative measure (Cumulalt) (as visible above) give me the same [Tons] for each [Classif] which i know it's false.
In consequences, my cumulative bar chart can't have this legend. That's the problem

Any idea ? i guess my measure is wrong and that's what's causing trouble (i guess with the ALL() )

Hi,

I cannot understand your question.  Someone who does will help you. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with, explain the question and show the expected result in a simple Table format.  From the Table, we can build any visual we want. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.