Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
nirrobi
Helper V
Helper V

What If Analysis - Data Table - similar to exel function

Hi all,

I want to implement in PBI the same function as in excel .

I have 2 variables that effect measure and what to see in one table how the change of those 2 variables effect the calculation of the measure.

 

in excel its located in the following path:

data ribbon

what if

data table

 

for example multiplication table.

 

C4 - X

B4 - Y

 

in the first line of the table in the left - C4 * B4

 

 

the function excel create automatic:

{=TABLE(C4,B4)}

 

output

 

112345678910
112345678910
22468101214161820
336912151821242730
4481216202428323640
55101520253035404550
66121824303642485460
77142128354249566370
88162432404856647280
99182736455463728190
10102030405060708090100

 

Is it possible to implement it in excel?

 

thanks in advanced.

Nir.

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

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:

1.PNG

 

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.

2.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

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:

1.PNG

 

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.

2.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Yuliana ,

thanks for your message.

 

When I follow your guidence I ended with this table :

 

image.png

I change the base table as follow:

image.png

 

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:

image.png

 

and the formula for the measure:

 

multiplication = MAX( Sheet2[X] ) * MAX( Sheet1[Y] )

 

can you please check if you see any reason for that?

I reproduce from scratch and I works smoothly.

 

many thanks,

 

Nir

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.