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

Set analisys duplicate

Hi! im new is this group, sorry for my english.

This is my problem: I have some tables:

cars

car_states

and the value of the car, this coulb be in to tables:

car_model

car_price

The car have an identity, unique. The problem is i need sum the car's price, and sum twice because state of the car, and i can't

set distinct in set analisis because if two cars (they are unique by identity) have same price, get less the sum.

the code:

=sum( "some set analisis" if(isnull(car_price.price),car_model.price,car_price.price) )

can somebody help me? Thanks!!

6 Replies
MayilVahanan

HI

Can you explain in brief,

Cars table contains  cars model, cars price?

Car_States table contains?

can you provide sample data?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi!

Examples

cars (icar,desc,idmodel)

car_states (idcar,state_desc)

car_model (idmodel, model_desc)

car_price (idcar, price_car)

thanks!!

MayilVahanan

Hi Patrick,

Can you please provide a sample qv file which contains dummy data. Need a relation ship between tables and values in it. Without knowing the data structure, its difficult to find the solution..

Can you provide a sample data? and expected results?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Please, see the excel attached, in the sheet example there are the tables and in the other sheet(Notes) there are some stuff...

Thanks again!!!

somenathroy
Creator III
Creator III

Pls. find the attached QVW. hope it helps.

Regards,

Som

Not applicable
Author

Guys, i resolved the problem :

=sum( $(vFiltroStockA) EstadoUnidad = {'Sin Asignar'}, VariableNombre = {'Linea Barco'}, [Tipo Unidad] = {'Propias'}>} aggr(if(num(LBMes) = num(month(today())-1) and isnull(ReservaDia) , $(vCostoConIVA)),IDFabrica ))

aggr was the solution, it returns a distinct idcar and i do the sum OK!

BUT,  in the set analisys, i use anothers fields from the app and the problems is that this impact in my graph...

how can i use set analisys with aggr??????