HELLO, I have this app with the table "Simulador" the client chooses which format in this example is "Bilboard Desktop" in "Produto1" then choose which cities in this example is "Lisboa e Porto" in Região (enumlist) that is ref to the table "Inventario" and then needed to sum the inventory of all the chosen cities and only the chosen format in "Total impressões" .The data is in the "Inventario" table. I'm having trouble doing it in just one formula or just one table.
thanks for the help
Solved! Go to Solution.
Hi @Tiago_Pereira , data is in a format suitable for a spreadsheet, but not for a database. Ideally, you should have the initial two columns for Região and Produto, repeating the region for each new product. There is no need for the Visualizações Totais and % columns, as you can easily achieve this with a formula. The table would then have 3 columns: Região, Produto and Qtd. Thus, the expression could be: SUM(SELECT(Simulador[Qtd],AND(IN([Região],[_THISROW].[Região]),[Produto] = [_THISROW].[Produto]))).
Otherwise, you will need to create a SWITCH expression with one SUM/SELECT for each Produto.
Hi,
can you test
SUM(
SELECT(
Simulador[Produto1],
AND(
IN([Região],[Região]),
[Produto1] = [Produto1]
)
)
)
Hi Jballester thanks for the help, gives me the error The 'SUM' function requires a list of numeric inputs
Maybe if the table is inverted it will be easier?
Hi @Tiago_Pereira , data is in a format suitable for a spreadsheet, but not for a database. Ideally, you should have the initial two columns for Região and Produto, repeating the region for each new product. There is no need for the Visualizações Totais and % columns, as you can easily achieve this with a formula. The table would then have 3 columns: Região, Produto and Qtd. Thus, the expression could be: SUM(SELECT(Simulador[Qtd],AND(IN([Região],[_THISROW].[Região]),[Produto] = [_THISROW].[Produto]))).
Otherwise, you will need to create a SWITCH expression with one SUM/SELECT for each Produto.
Thanks RBTAndrade
🙏
User | Count |
---|---|
36 | |
9 | |
3 | |
3 | |
2 |