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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

Top Solution Authors