You have the data. So its totally possible to display it.
Lua Code:
if db['Currency'][myPlayerRealm][myPlayerFaction] == ('Alliance') then
In situations like this print out the variables so you can quickly see if the values are what you expect.
Here it seems you mixed up the content and the meaning of the key.
'myPlayerFaction' represents the value you try to compare.
db['Currency'][myPlayerRealm][myPlayerFaction] represents the list of your current faction.
From your described result to list all factions this means you have (at least) two faults here.
It should not be an if-elseif-clause if you want it all printed.
Lua Code:
GameTooltip:AddLine('Alliance:') -- dont put the header in your loop
for name,money in pairs(db['Currency'][myPlayerRealm]['Alliance']) do
GameTooltip:AddDoubleLine(name, formatMoney(money), 1, 1, 1, 1, 1, 1)
end