Forum Discussion

davidz106's avatar
davidz106
Helper III
4 years ago

Field parameter (working with blank rows in data)

I have two simple tables. 

data1 (ID, Value1)

data2a (ID, Value2)

 

The data in tables is from real world (it contains blank rows and also multiple values for one ID). That is why I always use average in my visualisations. 

 

I made a new query by combining IDs of both tables and relating both to combined query.  Then I try to plot with field parametes. However, I get an error which I assume is due to my dataset (blank rows and multiple values for a single ID). How can I define in field parameter DAX code that I want to work with average of a field parameter?

 

Code and sample .pbix:

 

x-axis = {
("Value1", NAMEOF('data1'[Value1]), 0),
("Value2", NAMEOF('data2a'[Value2]), 1)
}

 

 

I could make a separate measure (average) ffor Value1 and Value2 and this would work. But I want to solve this in field parameter DAX code because otherwise I would need to define large number of new measures with my real data.

2 Replies

  • davidz106 , The way t work as of now is if you use measures it will create a value slicer. If you use columns, it will create dimension/axis slicer

    • davidz106's avatar
      davidz106
      Helper III

      But if I use columns as my field parameters I cannot chose which calculation of column (average, min, max...) the visualization is supposed to show.

      As I understand field parametes can only work with native column values and it cannot use any calculation this way (as manual selection of axis would)