Forum Discussion
Measure depending on filter selected
- Anonymous3 years ago
Hi karti1507 ,
According to the error message, it seems the returned data of visual exceed the maximum allowed size of '1000000' rows when you also apply the field [Product num] and [product Name] onto the visual. And there is a one-million row limit for data returned from cloud data sources with DirectQuery, which are any data sources that aren't on-premises. Please find the details in the below documentation.
You can consider to create another two measures similar as below to replace the field [Product num] and [product Name] using the function CONCATENATEX, it will return less rows.
ConcatenateX in Power BI and DAX: Concatenate Values of a Column
Measure1 = VAR _selcustnum = SELECTEDVALUE ( 'Table'[Customer Num] ) RETURN CONCATENATEX ( FILTER ( 'Table', 'Table'[Customer Num] = _selcustnum ), 'Table'[Product num], "," )Measure2 = VAR _selcustnum = SELECTEDVALUE ( 'Table'[Customer Num] ) RETURN CONCATENATEX ( FILTER ( 'Table', 'Table'[Customer Num] = _selcustnum ), 'Table'[Product name], "," )Finally, you will get the result similar as below:
Best Regards
Hi karti1507 ,
According to the error message, it seems the returned data of visual exceed the maximum allowed size of '1000000' rows when you also apply the field [Product num] and [product Name] onto the visual. And there is a one-million row limit for data returned from cloud data sources with DirectQuery, which are any data sources that aren't on-premises. Please find the details in the below documentation.
You can consider to create another two measures similar as below to replace the field [Product num] and [product Name] using the function CONCATENATEX, it will return less rows.
ConcatenateX in Power BI and DAX: Concatenate Values of a Column
Measure1 =
VAR _selcustnum =
SELECTEDVALUE ( 'Table'[Customer Num] )
RETURN
CONCATENATEX (
FILTER ( 'Table', 'Table'[Customer Num] = _selcustnum ),
'Table'[Product num],
","
)Measure2 =
VAR _selcustnum =
SELECTEDVALUE ( 'Table'[Customer Num] )
RETURN
CONCATENATEX (
FILTER ( 'Table', 'Table'[Customer Num] = _selcustnum ),
'Table'[Product name],
","
)
Finally, you will get the result similar as below:
Best Regards