cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User
Super User

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors