Forum Discussion
DAX
- Anonymous2 years ago
Hi Anonymous ,
Now that you have created a measure for deltas, you can use the existing measure to create another measure to calculate positive and negative deltas. You can try following these steps:
1. You need to create a new measure.
MEASURE = VAR _1 = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Price] > 0 ) ) VAR _2 = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Price] < 0 ) ) RETURN IF ( SELECTEDVALUE ( 'Table (2)'[Selected] ) = "+", _1, _2 )
Final output:How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, sorry.
This is an idea of how I would like my card to look like. Basically counting the number of negatives or positive points on my graph.
Thank you!
Anonymous
assuming
your delta measure = delta_m
now the requirement is that you want to count the nb of negative or positive ( let u stick to pos in this exmaple )
your new measure =
var ds =
countx(
filter(
addcolumns(
values(tbl_name[col_name]) ,
"@delta " , [delta_m]
) ,
[@delta] > 0
),
tbl_name[col_name]
)
this should work .
nb: replce tbl_name[col_name] with the groupby column you are calculating your deltas based on .
ex :
you want nb of post delta grouped by customer name ;
then tbl_name[col_name] === dimcustomer[customr_name]
hope this make sense.
If this helped you solved your question , mark it as the solution ✅ so can you can help other people in the community find it easily .