Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Card
I like to create a summary P&L Table :-
Rev ......... 100K
COGS........80K
PROFIT.....20K
EXP............10k
NP..............10k
I have try the 3 different type of card all not suitable :-
Paul
Solved! Go to Solution.
Hi, @admin11
You can try the following steps.
1 Create a Calculated table
Table =
VAR t_cogs =
FILTER ( DISTINCT ( GL[1_COGS] ), NOT ( ISBLANK ( GL[1_COGS] ) ) )
VAR t_exp =
FILTER ( DISTINCT ( GL[1_EXP] ), NOT ( ISBLANK ( GL[1_EXP] ) ) )
VAR t_cogs_exp =
UNION ( t_cogs, t_exp )
RETURN
SELECTCOLUMNS ( t_cogs_exp, "COGS&EXP", [1_COGS] )
2 Create a Measure
_YTD COGS&EXP = IF(SELECTEDVALUE('Table'[COGS&EXP])="COGS",[_YTD COGS],[_YTD EXP]/1000)
3 Crate a Table visual, the result looks like this:
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @admin11
In your formula, the name of Measures used don't match the Measures ‘_YTD_COGS’, ‘_YTD EXP’ and ‘_YTD COGS’ in your file. And there are some columns with yellow alert information. You need cope with them firstly, then you can try this Measure:
Table =
UNION (
SUMMARIZE ( 'Date', "REV", [_LYTD REV] ),
SUMMARIZE ( 'Date', "COGS", [_YTD COGS] ),
SUMMARIZE ( 'Date', "Exp", [_YTD EXP] )
)
For more details about SUMMARIZE function, you can refer Power BI SUMMARIZE and All secrets of SUMMARIZE.
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for sharing , i have try :-
above is my PBI file :-
Paul
Add ROUNDDOWN to the formula
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
I'm confused with the data '376,760' and '583,679'. Can you explain how to get them?
Best Regards
Caiyun Zheng
The issue already solve. now working fine. that are the old post.
Thank you very much
Paul
Hi, @admin11
You can try the following steps.
1 Create a Calculated table
Table =
VAR t_cogs =
FILTER ( DISTINCT ( GL[1_COGS] ), NOT ( ISBLANK ( GL[1_COGS] ) ) )
VAR t_exp =
FILTER ( DISTINCT ( GL[1_EXP] ), NOT ( ISBLANK ( GL[1_EXP] ) ) )
VAR t_cogs_exp =
UNION ( t_cogs, t_exp )
RETURN
SELECTCOLUMNS ( t_cogs_exp, "COGS&EXP", [1_COGS] )
2 Create a Measure
_YTD COGS&EXP = IF(SELECTEDVALUE('Table'[COGS&EXP])="COGS",[_YTD COGS],[_YTD EXP]/1000)
3 Crate a Table visual, the result looks like this:
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i Try to add one more field _YTD_OTH
First i create below Table_ it work fine , no error :-
I dont get any error , until i try to create the measure :-
my PBI file :-
Paul
You can try this Measure.
_YTD COGS&EXP&OTH =
SWITCH (
TRUE (),
'Table'[COGS&EXP&OTH] = "COGS", [_YTD COGS],
'Table'[COGS&EXP&OTH] = "EXP", [_YTD EXP],
'Table'[COGS&EXP&OTH] = "OTH", [_YTD OTH]
)
Best Regards,
Caiyun Zheng
I have try , i get error :-
My PBI file :-
Paul
It is caused by the table name error. In the formula, the table name is 'Table', but the table name in your pbix file is 'Table_'. Just change 'Table' to 'Table_'.
Best Regards
Caiyun Zheng
i start a new track to solve the issue , hope you can participate as well :-
Paul
I have just try to change the table to table_ , still cannot.
By the way :-
Table for test with 2 field REV and COSG
Table_ for test with 3 field REV and COGS and OTH
Can you refer the link above , and try to help me make it work and share with me the working PBI file.
Thank
Paul
Act here
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi AJ
Thank you for your help , i try but still not get waht i want :-
Paul
@admin11 , Not very clear, a new table like
union(
summarize('Table',"Var","Rev" ,[Rev] ),
summarize('Table',"Var","COGS" ,[COGS] ),
)
or a matrix visual with no row or column , with values and "Show on row"
https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/
Thank you very much. I try to union 3 table into 1 for below field name :-
I get error msg :-
My PBI file :-
Paul
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |