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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.