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

Problem with line chart

Hi All,

 

We have used a simple line chart in the report, wherein X-axis use Date, in Y-axis use Sales and in legends use Store as shown below. The problem here is that when I am select a few stores in slicers It shows total Quantity in the card, but when we try to select only one line from these three lines, it not reflect the total Quantity of that selected line, but it only reflects the quantity of that date selected.

Expected Result:

When we select only one line from these three lines in a card it shows Total Quantity of that selected line and not that selected date.

Thanks in Advance.

LineChart.png

 
1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

It because when select a line in line chart, it select sigle date as well, We can try to use following measure to meet your requirment:

 

Measure = IF(DISTINCTCOUNT('Table'[Store])=1,CALCULATE(SUM('Table'[Quantity]),ALL('Table'[Date])),CALCULATE(SUM('Table'[Quantity])))

 

3.jpg4.jpg5.jpg


If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared?


By the way, PBIX file as attached.


Best regards,



 

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

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

It because when select a line in line chart, it select sigle date as well, We can try to use following measure to meet your requirment:

 

Measure = IF(DISTINCTCOUNT('Table'[Store])=1,CALCULATE(SUM('Table'[Quantity]),ALL('Table'[Date])),CALCULATE(SUM('Table'[Quantity])))

 

3.jpg4.jpg5.jpg


If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared?


By the way, PBIX file as attached.


Best regards,



 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Sorry Please read In Y-Axis use Quantity

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.