The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I have a matrix that has different data types in rows. For example, some rows are int, some percentages, some currency, etc.
I have a line chart that displays the previous 52 weeks of data on the same page and I'd like it to show the correct data type that the user clicks on from the matrix. Right now, whatever line the user clicks on, it defaults to a decimal data type. I created a few cards to make sure my logic is correct and so far seems fine. Here is the dax measure I currently have on the line chart. I understand that it's not the cleanest and can be refactored, but just trying to get something working right now. Selected Value Type = SelectedValue(value type of matrix line)
Rolling 52 Week Value = If([Selected Value Type] == BLANK(), "",
IF(SUM('Daily Fact Metric'[YtdMeasure]) == Blank() && [Selected Value Type] == "decimal", SUM('Daily Fact Metric'[MetricMeasure]),
IF(SUM('Daily Fact Metric'[YtdMeasure]) == Blank() && [Selected Value Type] == "int", SUM('Daily Fact Metric'[MetricMeasureInt]),
IF(SUM('Daily Fact Metric'[YtdMeasure]) == Blank() && [Selected Value Type] == "money", SUM('Daily Fact Metric'[MetricMeasureCurrency]),
IF(SUM('Daily Fact Metric'[YtdMeasure]) == Blank() && [Selected Value Type] == "percent", SUM('Daily Fact Metric'[MetricMeasurePercent]),
SUM('Daily Fact Metric'[YtdMeasure]))))))
Please check the new measure formatting options in the April 2023 Power BI Desktop version.
Thank you. I did and nothing changed 😞
You mean these new features are not helping in your scenario?