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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
infantpowerbi
Helper II
Helper II

Required two measure’s value across an axis in Line Chart based on slicer

Dear All,

  • I am new and infant to power bi and facing lot of challanges for moving Tableau reports to Power BI
  • And below is the sample data format which is in my oracle db
    Company Q2 FY 2018  Q3 FY 2018  Q4 FY 2018  Q1 FY 2019  Q2 FY 2019  Q3 FY 2019
    X                    0                   0                  0                  0                  0                   0
    Y                    0                   0                  0                  0                  0                   0 
    Z                    1                   2                  0                  4                  5                   0   
    All                  0                   1                  3                  4                  2                   5 

  • I had line chart which is desinged in tableau with 2 lines one is orange color line which is for company A and other is Blue color line which is for X,Y,Z 
    Capture13.PNG

  • I had created a power bi report where I am able to show only one line in a legend whcih is applied for All,X,Y,Z companies
    when I select any value in slicer.
  • But my requirment is what ever company I select in slicer it should display in line chart along with company A as shown in above tableau line chart
    http://www.mediafire.com/folder/jn1hiwrqhm6gt/LineChart

    Can any one please help me in solving this issue ,For refrence you can download the file from above line
5 REPLIES 5
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @infantpowerbi ,

For your requirement, please try this measure below.

All =
CALCULATE (
    SUM ( 'Table2'[Value] ),
    FILTER ( ALL ( Table2[District] ), 'Table2'[District] = "ALL" )
)

Here is the ouptut.

Capture.PNG

More details, please refer to the attachment.

Best  Regards,

Cherry

 

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

Tq very much you are my galidator Smiley Very Happy ,

I lost hope on this

Hello,

 

In my case it'snot working ,
Requeest you to please kindly please review my pbix file and please let me know what's the issue
and where I am missing to get the things done
http://www.mediafire.com/folder/ifj41f0t3w30g/2_lines_in_Line_charts

 

Hi @infantpowerbi ,

From your sample, I found that your error is casued by the dax highlighed below.

 

All =
CALCULATE (
    SUM ( 'Ratifications_Table'[District Short] ),
    FILTER (
        ALL ( Ratifications_Table[District Short] ),
        'Ratifications_Table'[District Short] = "ALL"
    )
)

As your Ratifications_Table[District Short] column is a string type, so it cannot be usefd with sum function so you will have error message.

I'm afraid that you should create the measure like below.

All_ =
CALCULATE (
    SUM ( 'Ratifications_Table'[Value] ),
    FILTER (
        ALLSELECTED ( Ratifications_Table ),
        'Ratifications_Table'[District Short] = "ALL Districts"
    )
)

 

Best  Regards,

Cherry

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

Does Sum can be only applied for decimal numbers ?

Because I a trying to make it for % columns ,But finding no luck.Kindly please look into % column "AppSubmission"

 

https://www.mediafire.com/folder/rfypu8b8p5pe7/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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