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 folks.
I would like to build a Temp Table that I want to further use on some measures. It would be easy to create this table on the report layout, if I wanted just the visualization, but I want the Table itself and I am having a hard time.
There are two FACT tables and two DIM tables (let's call them FACT1, FACT2, DIM1, DIM2).
I want to SUMMARIZE the Table FACT1 by ID1, ID2 and Quarter (Qtr X YYYY), adding a calculated column from a Measure on FACT2.
The Measure is:
SO UNITS = SUM('FACT2'[UNID])
SO UNITS PYG % =
VAR __PREV_YEAR =
CALCULATE ( [SO UNITS]; DATEADD ( 'Calendar'[Date].[Date]; -1; YEAR ) )
RETURN
DIVIDE ( [SO UNITS] - __PREV_YEAR; IF ( __PREV_YEAR = 0; 1; __PREV_YEAR ) )
To create the table, I did something like this:
TEMP TABLE = VAR TTABLE = ADDCOLUMNS ( 'FACT1'; "QUARTERFACT"; CONCATENATE("Qtr ";CONCATENATE(ROUNDUP(MONTH('FACT1'[Data])/3;0);CONCATENATE(" ";FORMAT('FACT1'[Data];"YYYY")))) ) RETURN SUMMARIZE ( TTABLE; 'FACT1'[ID1]; 'FACT1'[ID2]; [QUARTERFACT]; "tempmeasure"; [SO UNITS PYG %] )
Looking at the result, this is obviously very wrong.
What am I missing here? I am lost in context here, I think. I have tried messing around with it but no luck so far.
Thanks in advance.
Cheers.
Hi @Anonymous
I test with your data model and formula on my site, but I can get the result i want.
I don't know what your expected result and what's wrong of the last screenshot.
Could you point out these?
Best Regards
Maggie
I could send you a sample file, but I have stepped upon the issue that I will explain below several times...
How can I sample data and remove the queries from the PBIX file so that it's smaller, addresses privacy and still you can test it? It's a 70MB file (huge tables) with several data sources.
Is there a fast way of doing this or should I just change the queries one by one?
Thanks.
Hi @Anonymous
You could make a copy of your pbix, then go to Query Editor, use "keep rows","keep columns" or "remove rows" to keep the data which can explain your problem.
Due to privacy, you can send me a message.
Best Regards
Maggie
I will send you a private message.
Thanks a lot.
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |