Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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, 100000,1),-1,"")}
@AlexisOlson @bcdobbs @CNENFRNL
Solved! Go to Solution.
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.
It seems like a bug to me since it gives the following error rather than something more descriptive but, as PhilipTreacy mentioned, the official documentation doesn't say that it's supported.
Interstingly, dax.do doesn't throw an error for the query
EVALUATE {TOJSON(GENERATESERIES(1, 100000,1),-1)}
I have an application where it can become extremely useful.
I really don't care about -1. I only want an expression/dynamic expression to include all rows.
BTW it does not work too.
@jeffrey_wang can you shed some light if it is doable.
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.
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
Proud to be a Super 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
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |