cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
infantpowerbi Regular Visitor
Regular Visitor

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
Community Support Team
Community Support Team

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

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.
infantpowerbi Regular Visitor
Regular Visitor

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

Tq very much you are my galidator Smiley Very Happy ,

I lost hope on this

infantpowerbi Regular Visitor
Regular Visitor

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

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

 

Community Support Team
Community Support Team

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

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.
infantpowerbi Regular Visitor
Regular Visitor

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

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
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 269 members 2,809 guests
Please welcome our newest community members: