March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I am getting crazy by a weird behaviour of SELECTCOLUMNS with some - but not all - tables in my dataset.
Since I need to split my data on a yearly basis, I use SC to create a new table with just required columns.
The problem is that same formula produces different outcomes:
- in some cases, values are entered in respective columns (2020 values in 2020 col, 2021 values in 2021 col, and so on)
- in other cases, the same formula has sum up all values of respective years, then populated the new table with these totals
For sure I am doing something wrong, but I just can't figure out where...
Many thanks in advance to whose can provide any help/hint.
Solved! Go to Solution.
Hi All,
for all those interested, root cause and solution of the issue can be found in this post: Same Formula applied on identical Tables gives different outcome
Hi All,
for all those interested, root cause and solution of the issue can be found in this post: Same Formula applied on identical Tables gives different outcome
@Anonymous , Use summarize
example
summarize(Table, Table[Date], "2020", calculate(sum(Table[Value]), filter(Table, Table[Year] =2020) )
, "2021", calculate(sum(Table[Value]), filter(Table, Table[Year] =2021) )
, "2022", calculate(sum(Table[Value]), filter(Table, Table[Year] =2022) ))
thanks for your reply; however, though your solution works for different purposes, I don't need the years' totals but all the rows for the same period (see picture 'expected outcome').
In addition, please note that the same logic works with some tables but not with others, so I wonder whether the problem is not in which formula is going to use but in the data/table; here is were I am getting lost.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |