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 I am using Dax Studio and I have figured out how to get the calculation I need in the Output section of DAX Studio, but the output is in the form of a table. I just need the sum of the column generated by using GENERATE and ROW.
I need the column in the red circle summed as that is the value I want for the metric in PowerBI.
I have tried everything I can think of...new to DAX....searched high and low. Just don't seem to be able to reference the "generated" table with any commands outside of the GENERATE ROW.
Solved! Go to Solution.
// Very easy in fact...
// After the last RETURN
// you have to do:
sumx(
DOHTable,
[DOH]
)
// But I can't see a reason to use
// GENERATE for this when just
// ADDCOLUMNS would suffice or even
// just calculations on the fly under SUMX.
// For the calculation of the sum,
// of course, all the columns apart
// from DOH are not needed. By the way,
// the DAX standard is that all columns
// which are calculated in a measure/query
// should start with "@". Just to be able
// to differentiate them from physical columns
// and measures.
// Very easy in fact...
// After the last RETURN
// you have to do:
sumx(
DOHTable,
[DOH]
)
// But I can't see a reason to use
// GENERATE for this when just
// ADDCOLUMNS would suffice or even
// just calculations on the fly under SUMX.
// For the calculation of the sum,
// of course, all the columns apart
// from DOH are not needed. By the way,
// the DAX standard is that all columns
// which are calculated in a measure/query
// should start with "@". Just to be able
// to differentiate them from physical columns
// and measures.
Yes. That worked. This wins a battle, but probably not the war on this project. I know there is a better way to do it, but this way was shown for "days of cover" by 2 DAX VIPs. You have to iterate through several weeks for a proper days on hand.
Well, I would easily dare question their VIP-ness, LoL :)))
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 |
---|---|
48 | |
24 | |
20 | |
14 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |