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
JvH
New Member

PRODUCTX working for Line Chart, but not for Bar Chart

Hi,

 

I've got a measure defined to calculate the product of a column.

 

Total Return_pct =
CALCULATE(
    PRODUCTX(daily,daily[return_pct]) -1,
    FILTER(
        ALLSELECTED(daily),
        daily[date] <= MAX(daily[date])
    )
)

 

It nicely shows the return % over time, when displayed in a line chart:

JvH_0-1667750066904.png

When I use it in a bar chart, to show the return % for a certain period, it doesn't work (i.e. shows a value that seems consistent for all funds/categories:

JvH_1-1667750126543.png

 

Any thoughts on why and how to fix?

 

1 REPLY 1
daXtreme
Solution Sage
Solution Sage

The first visual has time on the x-axis, so at each time point this is different: 

MAX(daily[date])

and hence the values on the chart are different.

 

I think the other visual does display the correct values, though. They are not the same. The last 3 are 100%, so there is some change. Nothing more can be said without seeing the dataset, I'm afraid.

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.