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
Anonymous
Not applicable

line graph - adding additional line based on same table data

I am currently graphing this data set and it allows me to filter for LE, RO, or LE + RO, however I would like to be able to to show my most recent submission LE AND my most recent submission LE + RO.  The graph I can currently get PowerBI to display is composed of the RED (Submission 4: LE + RO) and BLACK (Submission 3: LE ONLY).  I would like for the graph to also be able to display the BLUE line (Submission 4: LE ONLY).

 

Capture.PNG

Line Chart Settings:  Axis: Month; Values: Submission_Final; Values: Cumulative LERO

I have two slicers for the data - LE/RO and Submission 

 

These are the columns used from my dataset (Submission_Final is a measure):

 

Query: LE + R&O

LE/ROMonthVariance ($k)Submission_1Submission_Final
RO11null4
RO12null4
RO23null4
RO34null4
RO45null4
LE1-533
LE1622
LE2-333
LE2-544
LE3-433
LE4-722

 

Submission_Final = If( IsBlank('LE + R&O'[Submission_1]), MAX('LE + R&O'[Submission_1]),'LE + R&O'[Submission_1])
 

The lines in my graph are cumulative values - I used the following measure for them:

 

Cumulative LERO = CALCULATE (
SUM ('LE + R&O'[Variance]),
FILTER (
ALL ('LE + R&O'[Month]),
'LE + R&O'[Month] <= MAX ('LE + R&O'[Month])
)
)

 

Is it possible to create a measure to graph this data or how would you recommend I get this additional line added to my chart?  I do not need the LE + RO/LE to show for all the submissions, just the most recent.  

 

Thanks!

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

I am currently graphing this data set and it allows me to filter for LE, RO, or LE + RO, however I would like to be able to to show my most recent submission LE AND my most recent submission LE + RO.  The graph I can currently get PowerBI to display is composed of the RED (Submission 4: LE + RO) and BLACK (Submission 3: LE ONLY).  I would like for the graph to also be able to display the BLUE line (Submission 4: LE ONLY).


Could you clarify more about the logic to achieve "Submission 4"?

 

Community Support Team _ Jimmy Tao

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

Anonymous
Not applicable

Every month I get a new LE and RO (Risks & Opportunities) submission so basically Submission = Input Month and the LE (Latest Estimate) is spread out over multiple categories in the different months. 

 

I'm wondering if because I have Submission 1 and Submission_Final I can use my measure for Cumulative LERO and add a filter to use Submission 1 for one set of data (LE ONLY) and Submission_Final for the second set (LE + RO)...?  I would then remove the Legend and use Cumulative LERO and Cumulative LE.  However, I'm not sure how to formulat the filter to only use data that has a value for Submission 1 to calculate Cumulative LE.

 

Cumulative LERO would stay as it currently is and then Cumulative LE:

 

Cumulative LE = CALCULATE (
SUM ('LE + R&O'[Variance]),

DISTINCTCOUNT('LE + R&O'[Submission_1]),
FILTER (
ALL ('LE + R&O'[Month]),
'LE + R&O'[Month] <= MAX ('LE + R&O'[Month])
)
)

 

However when I try and use this measure I get the following error:  'The True/False expression does not specify a column...'

Anonymous
Not applicable

Okay, not sure if anyone can help out with this but I've attempted the following solution and I think it should work but I think my logic is incorrect.

 

I have removed my Slicer for LE/R&O & Submission with the intent that only the most recent Submission will be graphed on my line graph.  My line graph has the following measures input in the Values field:

 

(Blue Line - in diagram from first post)

Cumulative LERO = CALCULATE (
SUM ('LE + R&O'[Variance]),
FILTER (
ALL ('LE + R&O'[Month]),
'LE + R&O'[Month] <= MAX ('LE + R&O'[Month])
)
)
 
AND
 
(Red Line in diagram from first post)
Cumulative LE ONLY = CALCULATE(
CALCULATE (
SUM ('LE + R&O'[Variance]),
FILTER (
ALL ('LE + R&O'[Month]),
'LE + R&O'[Month] <= MAX ('LE + R&O'[Month])
&& MAX('LE + R&O'[Submission_1]))))
 
%Reasoning for this is that because Submission_Final has all the R&O values with a Submission_Final of 4 (Max submission) and Submission_1 has a null value for Submission_1 for the R&O values I should be able to see only the LE by filtering for Max Submission_1...
The only issue is that they're now showing the same values - which are incorrect and appear to be the cumulative value of ALL the submissions not just most the recent submission.
 

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.