Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi, in my previous post I found out how to allocate a row number for each row in table. There will be a maximum of 30 rows.
Is it possible to allocate a different formula to a different row?
Something like this...
Any questions let me know.
Thanks for help
@PBE Well, more or less that is what the pattern in the article is doing. Essentially you are adding a column to the table for each recursive iteration. By doing this, you effectively avoid recursion within a single column which DAX does not like, it just makes it a complete pain to code and requires a reasonable maximum approach. Could it also be done as 30 measures instead of 30 columns in a table. Sure. But I'm not sure that is really any better and would likely be more of a pain to manage since the code would be split between 30 measures versus all in a single measure.
@PBE So most likely not, at least not in any acceptable form that you are probably going to want to deal with. Although, with 30 rows maximum it could, in theory, be possible. The reason is that there is a recursive element to this code for Backfill and DAX hates recursion with a passion. Previous Value (“Recursion”) in DAX - Microsoft Fabric Community
Thanks again @Greg_Deckler for your help. Is it possible I could calculate the answer separate from a table. I'm guessing here, perhaps allocate RN1 Work, RN1 Service and RN1 Backfill as the variables and the same for RN 2 work etc. Then use these variables to calculate the answer for each row.
Such as Formula 1 = RN1 Work - RN1 Service = answer 1
Formula 2 = RN2 Work - (RN1 Service + RN2 Service) = answer 2
Then say display answer 1 in card 1 and answer 2 in card 2 etc.
The part I definitely don't know is how to make RN1 Work and RN 1 Service into variables and use these in a formula.
Any ideas?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
79 | |
59 | |
36 | |
33 |
User | Count |
---|---|
92 | |
59 | |
59 | |
49 | |
41 |