Forum Discussion
smpa01
3 years agoCommunity Champion
Debugging TOJSON
Is there a reason why dynamic Max Rows in TOJSON does not work?
Table = {TOJSON(GENERATESERIES(1, 100000,1),-1)}
opposed to fully working TOCSV
Table = {TOCSV(GENERATESERIES(1, 10000...
- 3 years ago
There was a bug when MaxRows is -1 that was fixed recently. You need to wait for the next Desktop release. Unfortunately dynamic expression for the MaxRows parameter isn't supported.
PhilipTreacy
3 years agoSuper User
Hi smpa01
Not sure why you refer to MaxRows being dynamic - you've hardcoded -1 in that formula?
But I am getting an error when using a negative value for MaxRows, even though it says you can do this. Is this the problem you are having?
Regards
Phil
smpa01
3 years agoCommunity Champion
- I want to include all rows and by hardcoding -1, I am testing if it works on all rows. As per dax studio, a negative number should include all rows. Works for TOCSV not for TOJSON
- PhilipTreacy3 years agoSuper User
Hi smpa01
As I said, I also get an error when using -1 for MaxRows. But the official Microsoft documentation makes no mention of -1 as being a valid value
TOJSON function (DAX) - DAX | Microsoft Learn
regards
Phil