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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bnjmnr
New Member

Comparison Line chart based on slicer with measuees

Hello all, 

 

I'm quite new to Power BI and need help with the following issue:

I have made a page to compare invoiced revenue and actual revenue. I have a line chart that shows both values. However, there may be extra revenue on the actual revenue. I have made two measures: Total Actual Revenue & Total Actual Revenue including extra revenue. In the line chart is only shows the invoiced revenue and Total Actual Revenue. Sometimes I also need to compare the invoiced revenue with the actial revnue including extra revenue. I don't want three lines in the chart but I want to have a slicer with tiles to select either with or without extra revenue. The line for invoiced revenue always stays the same. Is this possible and if so, how can I do this? 
I hope I explained the situation well. 

 

Thank you in advance!

2 REPLIES 2
IoannisPhilip
Advocate II
Advocate II

Hi @bnjmnr ,
I hope I understand well what you want to achieve here. I will help you create buttons with your metrics step-by-step, allowing your end users to select which metrics will be shown in the line chart.
1. Create a table with your metrics as input (I am using an example from my dashboard, adjust accordingly).

IoannisPhilip_0-1685693855660.png
2. Create equivalent measures for each of your metrics

 

(Sel) eCom CPM = 
VAR calc = COUNTROWS(
    FILTER(eCom_Select_Measures,
    eCom_Select_Measures[eCom_Selected_Measures] = "CPM"))
    RETURN
    IF(ISBLANK([Countrows eCom Select measure]),
    BLANK(),
    IF(calc = 1, KPIs[CPM],
    BLANK()))

 

3. Create a metric that supports the previous one.

 

Countrows eCom Select measure = 
IF(
    ISFILTERED(eCom_Select_Measures[eCom_Selected_Measures]),
    COUNTROWS(VALUES(eCom_Select_Measures[eCom_Selected_Measures])),
    BLANK())

 

4. Then create your line chart with inputs on the axis the (sel) metrics you created above in step 2.

IoannisPhilip_1-1685694402347.png
5. Create a slicer and in the field input the column from the table you created in step 1.

Let me know if you have any questions.

Best of luck!😊
Ioannis

 

 

Hi, 

 

it is unclear for me, maybe if I tell what the names for my measures are it will be clear for me: the revenue including extra revenue is called: Total Actual Revenue

the name with just the revenue is called: Actual Revenue Excl Demurrage

both measures are in the tabel called: MeasuresTbl

the table that has the data for the measures is called: Finance TotalTbl. 

If you can adjust for the names maybe it will be clear! Thank you for your time!

 

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.