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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

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.

Anonymous
Not applicable

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!

Anonymous
Not applicable

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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