Forum Discussion
What If Analysis - Data Table - similar to exel function
- 9 years ago
Hi nirrobi,
It is not possible to generate such an data table automatically in Power BI desktop.
But we can achieve a similar output via below workaround. It would be better that the dataset imported into Power BI looks like:
Based on this basic table, you should create a calculated table using this formula:
Sheet2 = CROSSJOIN(SELECTCOLUMNS(Sheet1,"X",Sheet1[X]),SELECTCOLUMNS(Sheet1,"Y",Sheet1[Y]))
Create a measure that returns multiplication values.
multiplication = MAX(Sheet2[X])*MAX(Sheet2[Y])
In report view, insert a Matrix visual to display data.
Best regards,
Yuliana Gu
Hi nirrobi,
It is not possible to generate such an data table automatically in Power BI desktop.
But we can achieve a similar output via below workaround. It would be better that the dataset imported into Power BI looks like:
Based on this basic table, you should create a calculated table using this formula:
Sheet2 = CROSSJOIN(SELECTCOLUMNS(Sheet1,"X",Sheet1[X]),SELECTCOLUMNS(Sheet1,"Y",Sheet1[Y]))
Create a measure that returns multiplication values.
multiplication = MAX(Sheet2[X])*MAX(Sheet2[Y])
In report view, insert a Matrix visual to display data.
Best regards,
Yuliana Gu
Dear Yuliana ,
thanks for your message.
When I follow your guidence I ended with this table :
I change the base table as follow:
I use your formula for the new table:
Sheet2 =
CROSSJOIN(
SELECTCOLUMNS( Sheet1, "X" , Sheet1[X]),
SELECTCOLUMNS( Sheet1 ,"Y" , Sheet1[Y] ))
and got this table - 100 rows:
and the formula for the measure:
multiplication = MAX( Sheet2[X] ) * MAX( Sheet1[Y] )
can you please check if you see any reason for that?
- nirrobi9 years ago
Helper V
I reproduce from scratch and I works smoothly.
many thanks,
Nir