first
2 TopicsVisual Calculation using FIRST()
Hi Folks, I have data for some suppliers and prices for a material: Supplier Date NetPrice SUP1 28.02.2024 20,66 SUP1 29.02.2024 20,66 SUP2 01.03.2024 16,95 SUP2 02.03.2024 16,95 SUP2 03.03.2024 16,95 SUP2 04.03.2024 16,95 SUP2 05.03.2024 19 SUP2 06.03.2024 19 I want to show where the price was going up or down per supplier. The user wants to see this in an indexed line chart something like this: you can see that also the supplier changed so it is basically calculated Calculation = [Average of NetPrice] / FIRST([Average of NetPrice]) But when I do this in a visual calculation it doesn't work. Apperantly FIRST() does not respect the legend (even with the parameters for sorting blank values last). So it takes the first date of all suppliers. but for my second supplier the first value is then blank. this is why i get infinity values Any ideas on that?Solved649Views0likes1CommentFind first value above 50% by category using DAX
Dear DAX Brains Trust! I'm trying to write a column in DAX that returns the first value above 50% within a categorised cumulative column. For context I've got a big dataset off all the postcodes around Australia and with each postcode comes an income category, 14 to be precise, thanks to the Australia Bureau of Statistics (ABS). I've been through an arduous but insightful process via power query in which I have organised them by creating a list.generate function which has returned each income category within the postcode with cumulative running total of income % - Thanks to RickdeGroot (BI Gorrilla) and possibly the GOAT of M code. I've now got my data how I want it, and as a final step would like to create a measure or column. That returns the first value over 50% within the cumulative running for each postcode. I'm a bit stumped at how I achieve this, I've tried RANKX & TOPN but with very little success. Will post a screenshot of the data and attempted DAX code tomorrow. Any advice beforehand would be greatly appreciated.1.1KViews0likes3Comments