cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to compare any column with other columns in matrix

Dear All,

 

i am new in PBI and can't to solve my problems.

We have two simple data sets (KPI & Point).
We have statistic-measure (stat_wei) in the matrix.
Using filtering, we need select any column (point> value). How to calculate a measure (my_point) equal to the difference between my column and other columns.

In example, we was choise Point A2 and need to calclucate difference statistics [stat_wei], between A2 and other columns (point A1,A2,B1,B2).

 

PS.

The data is very large ~10 000 000 rows (csv file)

 

Have any ideas?

Thanks,

Stanislav

 

 

Link to  PBIX file 

 

My mesure stat_wei:

 

stat_wei = 
VAR base_wei=CALCULATE(sum('kpi'[weight]),ALLSELECTED('kpi'[val_cat]))
VAR count_wei=sum('kpi'[weight])
VAR mean_wei=SUMX('kpi','kpi'[val_num]*'kpi'[weight])/base_wei
RETURN IF(AVERAGE('kpi'[val_type])=1,mean_wei,count_wei*100/base_wei)

 

 

Example of KPI table:

KPI tableKPI table

 

Example of Point table:

Point tablePoint tableMy screenMy screen

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: How to compare any column with other columns in matrix

Hi All

I found a solution for this problem!
We must create two measures (raw & my) that will be calculated correctly:

raw = CALCULATE([stat_wei],REMOVEFILTERS(my_point))
my = CALCULATE([stat_wei],ALLSELECTED(point[val_cat],point[point]))

 scr2.JPG

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: How to compare any column with other columns in matrix

@StenX ,

 

Not sure what's the expected result you want to achieve, but you can refer to the similar cases below:

https://community.powerbi.com/t5/Desktop/Difference-between-2-columns-in-Matrix/td-p/374710

https://community.powerbi.com/t5/Desktop/Difference-between-two-columns-in-matrix-visualisation/td-p...

https://community.powerbi.com/t5/Desktop/Difference-between-2-columns-in-a-Matrix-Table/td-p/81614

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Frequent Visitor

Re: How to compare any column with other columns in matrix

Dear Jimmy,

Thanks for the links, but I'm afraid they will not help in my problem ((

 

 

Highlighted
Frequent Visitor

Re: How to compare any column with other columns in matrix

Hi All

I found a solution for this problem!
We must create two measures (raw & my) that will be calculated correctly:

raw = CALCULATE([stat_wei],REMOVEFILTERS(my_point))
my = CALCULATE([stat_wei],ALLSELECTED(point[val_cat],point[point]))

 scr2.JPG

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors