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

Adding a column to a table visual with a simple multiplication without getting more rows added

I would like to start my problem description with providing my example file: Rekenmodel_0008_-_test_-_PBI.pbix

 

When you go to page 1 of the report view you will find two slicers, an image and three tables.

The main table I am concerned about is the one in the middle.

I want to add a measure that will multiply the number of objects (5 when starting out not operating the slicers) with 4.

When you start out the table in the middle shows 3 rows as I expect from the Maintenance table.

But when I add my measure that multiplies the number of objects it will show the correct value of 20 but it will add a significant numbers of unwanted rows to the table (to 15 rows).

 

My Measure looks like this: Meting = COUNT(Equipment[ID])*4

 

 

Before adding the measure: Meting to the table in the middle it looks like this:

 

test_-_PBI_-_001.png

 

 

After adding the measure: Meting to the table in the middle it looks like this:

 

test_-_PBI_-_002.png

 

You can see that the resulting rows in the table expand from 3 results to 15 rows!

I expect the measure to only be applied to the initial 3 rows.

I have tried it with creating a column instead of a measure but then it won't change according to adjusting the slicers. I have googled and tried to change to DAX definition with for instance CALCULATE and FILTER but no luck so far.

 

So I expect the DAX definition of my measure: Meting is not correct in this case.

But I am not that experienced yet.

Some help would be very much appreciated!

 

Why do the number of resulting rows change from 3 to 15 when adding the measure?

 

What do I need to do to add a similar column that will be able to respond and calculate accordingly to adjusting the slicers?

 

For example: 

Situation 1 with slicer car active. Without the measure it shows the 2 resulting rows that I expect. But with the measure active on the table it will show the 15 rows again. Which is what I didn't expect and what I am trying to avoid. Can I add a calculation like this visible in the table to only the 2 resulting rows when applying the object slicer to car?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Martijn2019 Frequent Visitor
Frequent Visitor

Re: Adding a column to a table visual with a simple multiplication without getting more rows added

For now I have applied a filter so that unique can not be empty!

 

At least this makes the visual show the same 3 rows again as I initially had.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Adding a column to a table visual with a simple multiplication without getting more rows added

@Martijn2019 ,

 

Modify the measure as below:

Meting = COUNT(Maintenance[ID])*4

Capture.PNG 

 

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.

Martijn2019 Frequent Visitor
Frequent Visitor

Re: Adding a column to a table visual with a simple multiplication without getting more rows added

First of all let me thank you for your effort in looking into this with me! Thank you very much!

 

But to me this is not the answer yet.

 

In my calculation I want the number of objects to be part of the equation.

So Count(Equipment[ID]) should be part of it.

And as for now that means the problem in my description is not solved.

 

In the meanwhile I have also tried to create a merge between the tables with an inner join. But this has also not solved it for me yet.

 

I will be grateful for any help!

Martijn2019 Frequent Visitor
Frequent Visitor

Re: Adding a column to a table visual with a simple multiplication without getting more rows added

For now I have applied a filter so that unique can not be empty!

 

At least this makes the visual show the same 3 rows again as I initially had.

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors