Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I have a requirement to create histograms and this is the dax that I am using to create the x-axis in a table.
But I want to first compare the max and min values from both the tables (_t and _p) and then generateseriesaccordingly. For e.g.
I basically want to create this series in one table/dax so that I dont have to show different x-axis (one when Group By Client and when one Grouped by Product.) and I can show the same x-axis to create bins for both Client and Product.
Can you please help me change the var _max_value and var _min_value to compare the values from both the tables and then give the min or max value? Or if there is any other way to achieve this requirement?Solved! Go to Solution.
Hi @Saloni_Gupta ,
Try to modify your formula like below:
result_ =
VAR _max_value_t =
MAXX ( _t, [ByClinet] )
VAR _max_value_p =
MAXX ( _p, [ByProduct] )
VAR _max_value =
MAX ( _max_value_t, _max_value_p )
VAR _min_value_t =
MINX ( _t, [ByClinet] )
VAR _min_value_p =
MINX ( _p, [ByProduct] )
VAR _min_value =
MIN ( _min_value_t, _min_value_p )
RETURN
GENERATESERIES ( _min_value, _max_value )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Saloni_Gupta ,
Try to modify your formula like below:
result_ =
VAR _max_value_t =
MAXX ( _t, [ByClinet] )
VAR _max_value_p =
MAXX ( _p, [ByProduct] )
VAR _max_value =
MAX ( _max_value_t, _max_value_p )
VAR _min_value_t =
MINX ( _t, [ByClinet] )
VAR _min_value_p =
MINX ( _p, [ByProduct] )
VAR _min_value =
MIN ( _min_value_t, _min_value_p )
RETURN
GENERATESERIES ( _min_value, _max_value )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.